diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2017-12-06 20:25:06 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-01-22 12:53:33 +0200 |
commit | 95880aaf062616dd486139a27df86c80e93bd1a4 (patch) | |
tree | 7bc04617e1c19713efdc6305d93da3c0d90057e9 | |
parent | 44326993f4a32f0d7137e5125e877ebd8d821b2d (diff) |
nixos/initrd: Don't include some x86-specific modules unconditionally
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/vm/default.nix | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 90074a1ba77b5..ba9d7285fbab0 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -208,10 +208,11 @@ in "usbhid" "hid_generic" "hid_lenovo" "hid_apple" "hid_roccat" "hid_logitech_hidpp" - # Misc. keyboard stuff. + ] ++ optionals (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ + # Misc. x86 keyboard stuff. "pcips2" "atkbd" "i8042" - # Needed by the stage 2 init script. + # x86 RTC needed by the stage 2 init script. "rtc_cmos" ]; diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index ea6c6cf790ca4..aa340fcd8e26c 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -3,7 +3,8 @@ , img ? pkgs.stdenv.platform.kernelTarget , storeDir ? builtins.storeDir , rootModules ? - [ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ] + [ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" ] + ++ pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos" }: with pkgs; |