diff --git a/doc/config-examples/root-on-lvm.nix b/doc/config-examples/root-on-lvm.nix index 6ee1da32c44..4fd4ca3a65c 100644 --- a/doc/config-examples/root-on-lvm.nix +++ b/doc/config-examples/root-on-lvm.nix @@ -14,9 +14,7 @@ { boot = { grubDevice = "/dev/sda"; - initrd = { - extraKernelModules = ["ata_piix"]; - }; + initrd.kernelModules = ["ata_piix"]; copyKernels = true; bootMount = "(hd0,0)"; }; diff --git a/doc/config-examples/x86_64-usbstick.nix b/doc/config-examples/x86_64-usbstick.nix index 0ce79ae86dc..b76a07b0d57 100644 --- a/doc/config-examples/x86_64-usbstick.nix +++ b/doc/config-examples/x86_64-usbstick.nix @@ -4,7 +4,7 @@ boot = { grubDevice = "/dev/sda"; initrd = { - extraKernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"]; + kernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"]; enableSplashScreen = false; }; }; diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index b73da06b5c2..b2efbf2d5d5 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -177,10 +177,10 @@ $ nixos-hardware-scan > /mnt/etc/nixos/configuration.nix xlink:href="https://svn.nixos.org/repos/nix/configurations/trunk/"/>. It is very important that you specify in the option - all kernel modules - that are necessary for mounting the root file system, otherwise - the installed system will not be able to boot. (If this happens, - boot from CD again, mount the target file system on + all kernel modules that + are necessary for mounting the root file system, otherwise the + installed system will not be able to boot. (If this happens, boot + from CD again, mount the target file system on /mnt, fix /mnt/etc/nixos/configuration.nix and rerun nixos-install.) @@ -279,12 +279,8 @@ $ reboot NixOS configuration { - boot = { - initrd = { - extraKernelModules = [ "ata_piix" ]; - }; - grubDevice = "/dev/sda"; - }; + boot.initrd.kernelModules = [ "ata_piix" ]; + boot.grubDevice = "/dev/sda"; fileSystems = [ { mountPoint = "/"; @@ -296,11 +292,7 @@ $ reboot { label = "swap"; } ]; - services = { - sshd = { - enable = true; - }; - }; + services.sshd.enable = true; } diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 6ad59ae8486..b12b6175c61 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -13,9 +13,17 @@ + + + Nicolas + Pierron + + + 2007 2008 + 2009 Eelco Dolstra diff --git a/doc/manual/troubleshooting.xml b/doc/manual/troubleshooting.xml index 66de9795b59..ff19607844f 100644 --- a/doc/manual/troubleshooting.xml +++ b/doc/manual/troubleshooting.xml @@ -33,8 +33,7 @@ no services have been started. safemode to the kernel command line. This will disable auto-loading of modules for your PCI devices. However, you will probably need to explicitly add modules to - to get network support -etc. + to get network support etc. diff --git a/modules/installer/cd-dvd/installation-cd-base.nix b/modules/installer/cd-dvd/installation-cd-base.nix index 0fb1156dc71..428b262f75f 100644 --- a/modules/installer/cd-dvd/installation-cd-base.nix +++ b/modules/installer/cd-dvd/installation-cd-base.nix @@ -114,7 +114,7 @@ in # The initrd has to contain any module that might be necessary for # mounting the CD/DVD. - boot.initrd.extraKernelModules = + boot.initrd.kernelModules = [ # SATA/PATA support. "ahci" @@ -158,6 +158,9 @@ in # Add vfat to enable people to copy the contents of the CD to a # bootable USB stick. "vfat" + + # And of course we need to be able to mount the CD. + "iso9660" "loop" "squashfs" ]; # nixos-install will do a pull from this channel to speed up the diff --git a/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix b/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix index 0bdd6ebdb34..407fc6929db 100644 --- a/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix +++ b/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix @@ -31,7 +31,7 @@ rec { ln -s /bin "$out/var/run/current-system/sw/sbin" ''; - boot.initrd.extraKernelModules = [ + boot.initrd.kernelModules = [ "iso9660" "loop" "squashfs" ]; boot.initrd.allowMissing = true; diff --git a/modules/installer/cd-dvd/installation-cd-minimal-test-insecure.nix b/modules/installer/cd-dvd/installation-cd-minimal-test-insecure.nix index b531ccaaf3d..2992724373e 100644 --- a/modules/installer/cd-dvd/installation-cd-minimal-test-insecure.nix +++ b/modules/installer/cd-dvd/installation-cd-minimal-test-insecure.nix @@ -19,7 +19,7 @@ in }; - boot.initrd.extraKernelModules = + boot.initrd.kernelModules = ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"]; environment.systemPackages = [ pkgs.vim_configurable ]; diff --git a/modules/installer/cd-dvd/installation-cd-rescue.nix b/modules/installer/cd-dvd/installation-cd-rescue.nix index 9be701e1bd2..43bb4c40930 100644 --- a/modules/installer/cd-dvd/installation-cd-rescue.nix +++ b/modules/installer/cd-dvd/installation-cd-rescue.nix @@ -34,7 +34,7 @@ ]; boot.kernelPackages = pkgs.kernelPackages_2_6_31_rc4_old_i686; - boot.initrd.extraKernelModules = ["evdev" "i8042" "pcips2" "serio" + boot.initrd.kernelModules = ["evdev" "i8042" "pcips2" "serio" "sd_mod" "libata" "unix" "usbhid" "uhci_hcd" "atkbd" "xtkbd" "fbdev" "iso9660" "udf" "loop"]; boot.kernelModules = ["fbcon" "radeonfb" "intelfb" "sisfb" "nvidiafb" diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix index 3cc558a346d..1d23acb36d1 100644 --- a/modules/installer/cd-dvd/iso-image.nix +++ b/modules/installer/cd-dvd/iso-image.nix @@ -123,10 +123,12 @@ in # We need squashfs in the initrd to mount the compressed Nix store, # and aufs to make the root filesystem appear writable. - boot.extraModulePackages = (optional - (! config.boot.kernelPackages.kernel.features ? aufs) - config.boot.kernelPackages.aufs); - boot.initrd.extraKernelModules = ["aufs" "squashfs"]; + boot.extraModulePackages = + optional + (! config.boot.kernelPackages.kernel.features ? aufs) + config.boot.kernelPackages.aufs; + + boot.initrd.kernelModules = ["aufs" "squashfs"]; # Tell stage 1 of the boot to mount a tmpfs on top of the CD using # AUFS. !!! It would be nicer to make the stage 1 init pluggable diff --git a/modules/installer/tools/nixos-hardware-scan.pl b/modules/installer/tools/nixos-hardware-scan.pl index 73f65a6d83e..50ce8a043f6 100644 --- a/modules/installer/tools/nixos-hardware-scan.pl +++ b/modules/installer/tools/nixos-hardware-scan.pl @@ -216,7 +216,7 @@ print <boot.initrd.kernelModules. + ''; }; initrd = { @@ -122,19 +121,7 @@ let system (e.g., ext3). The set specified here is automatically closed under the module dependency relation, i.e., all dependencies of the modules list here are included - automatically. If you want to add additional - modules, it's best to set - . - "; - }; - - extraKernelModules = mkOption { - default = []; - description = " - Additional kernel modules for the initial ramdisk. These are - loaded before the modules listed in - , so they take - precedence. + automatically. "; }; diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 4d6502ba66b..907f5b7260a 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -110,9 +110,7 @@ let # Determine the set of modules that we need to mount the root FS. modulesClosure = pkgs.makeModulesClosure { - rootModules = - config.boot.initrd.extraKernelModules ++ - config.boot.initrd.kernelModules; + rootModules = config.boot.initrd.kernelModules; kernel = modulesTree; allowMissing = config.boot.initrd.allowMissing; }; diff --git a/modules/virtualisation/qemu-vm.nix b/modules/virtualisation/qemu-vm.nix index 5d4d458de46..8f00f69548b 100644 --- a/modules/virtualisation/qemu-vm.nix +++ b/modules/virtualisation/qemu-vm.nix @@ -7,7 +7,7 @@ # the VM in the host. On the other hand, the root filesystem is a # read/writable disk image persistent across VM reboots. -{config, pkgs, ...}: +{ config, pkgs, ... }: with pkgs.lib; @@ -71,7 +71,7 @@ in # All the modules the initrd needs to mount the host filesystem via # CIFS. Also use paravirtualised network and block devices for # performance. - boot.initrd.extraKernelModules = + boot.initrd.kernelModules = ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"]; boot.initrd.extraUtilsCommands =