diff options
author | Profpatsch <mail@profpatsch.de> | 2016-02-26 03:18:37 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2016-02-26 03:18:37 +0100 |
commit | 4b435f20075d73cfcea7c7a9c2ebebb86015c818 (patch) | |
tree | f842bbe57c87ac3f5a93d63af752b7cd2d21418e /modules/hardware/t100ha/default.nix | |
parent | 3cbe26730d6e7b64040979d512afe46f90ed33ab (diff) | |
parent | f3f4e855600a10cc1ae7275f9ecf302160430b6a (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'modules/hardware/t100ha/default.nix')
-rw-r--r-- | modules/hardware/t100ha/default.nix | 60 |
1 files changed, 54 insertions, 6 deletions
diff --git a/modules/hardware/t100ha/default.nix b/modules/hardware/t100ha/default.nix index d5f2138e..c55a1acc 100644 --- a/modules/hardware/t100ha/default.nix +++ b/modules/hardware/t100ha/default.nix @@ -8,13 +8,61 @@ in { options.vuizvui.hardware.t100ha.enable = lib.mkEnableOption desc; config = lib.mkIf cfg.enable { - # Needed for booting from MMC: - boot.initrd.availableKernelModules = [ - "xhci_pci" "sdhci_acpi" "mmc_block" - ]; - # It's a CherryTrail SoC, so we want to have the latest and greatest: - boot.kernelPackages = pkgs.linuxPackages_latest; + # It's a CherryTrail SoC, so we want to have the latest and greatest with a + # few additional patches: + boot.kernelPackages = let + nixpkgs = import ../../../nixpkgs-path.nix; + mkKernel = import "${nixpkgs}/pkgs/os-specific/linux/kernel/generic.nix"; + t100haKernel = mkKernel rec { + version = "4.5-rc5"; + modDirVersion = "4.5.0-rc5"; + extraMeta.branch = "4.5"; + + src = pkgs.fetchurl { + url = "mirror://kernel/linux/kernel/v4.x/testing/" + + "linux-${version}.tar.xz"; + sha256 = "06qlypnrlkckxhf3clq6l2d3kps7rwfw811sxapjbnhzjd75fcx8"; + }; + + kernelPatches = lib.singleton { + name = "drm-fixes.patch"; + patch = ./drm-fixes.patch; + }; + + extraConfig = '' + MMC y + MMC_BLOCK y + MMC_SDHCI y + MMC_SDHCI_ACPI y + PINCTRL_CHERRYVIEW y + ''; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; + + inherit (pkgs) stdenv perl buildLinux; + }; + self = pkgs.linuxPackagesFor t100haKernel self; + in self; + # By default the console is rotated by 90 degrees to the right. boot.kernelParams = [ "fbcon=rotate:3" ]; + services.xserver.deviceSection = '' + Option "monitor-DSI1" "Monitor[0]" + ''; + services.xserver.monitorSection = '' + Option "Rotate" "left" + ''; + services.xserver.videoDriver = "intel"; + + # The touch screen needs to be rotated as well: + services.xserver.inputClassSections = lib.singleton '' + Identifier "touchscreen" + MatchProduct "SIS0457" + Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" + ''; }; } |