diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-01-14 13:04:21 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-01-14 13:04:21 +0100 |
commit | 51d85b1dd501b9fe28f71e6c691c2149c787b24f (patch) | |
tree | fd8ae606f313b78dd9db0cb0424ad1d64e10a8b9 | |
parent | 330a6ac8dfbbffb8112663ccf8c1d3d67aa3cd3e (diff) |
machines/tyree: Factor out T100HA specific stuff
This should go into its own hardware module, so it might be helpful for others as well (especially if we're going to put it into upstream <nixpkgs>). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r-- | machines/aszlig/managed/tyree.nix | 7 | ||||
-rw-r--r-- | modules/hardware/t100ha/default.nix | 20 | ||||
-rw-r--r-- | modules/module-list.nix | 1 |
3 files changed, 23 insertions, 5 deletions
diff --git a/machines/aszlig/managed/tyree.nix b/machines/aszlig/managed/tyree.nix index 4711fd40..fead2ef3 100644 --- a/machines/aszlig/managed/tyree.nix +++ b/machines/aszlig/managed/tyree.nix @@ -1,12 +1,8 @@ { config, pkgs, lib, ... }: { - boot.initrd.availableKernelModules = [ - "xhci_pci" "usbhid" "sdhci_acpi" "mmc_block" - ]; + boot.initrd.availableKernelModules = [ "usbhid" ]; boot.kernelModules = [ "kvm-intel" ]; - boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = [ "fbcon=rotate:3" ]; boot.loader.gummiboot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -78,5 +74,6 @@ extraGroups = [ "video" "wheel" ]; }; + vuizvui.hardware.t100ha.enable = true; vuizvui.user.aszlig.programs.vim.enable = true; } diff --git a/modules/hardware/t100ha/default.nix b/modules/hardware/t100ha/default.nix new file mode 100644 index 00000000..d5f2138e --- /dev/null +++ b/modules/hardware/t100ha/default.nix @@ -0,0 +1,20 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.vuizvui.hardware.t100ha; + desc = "hardware support for the ASUS T100HA convertible"; + +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; + # By default the console is rotated by 90 degrees to the right. + boot.kernelParams = [ "fbcon=rotate:3" ]; + }; +} diff --git a/modules/module-list.nix b/modules/module-list.nix index dbba2a01..47d82810 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -1,4 +1,5 @@ [ + ./hardware/t100ha ./profiles/common.nix ./profiles/tests.nix ./services/multipath-vpn.nix |