diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index 02de35e0cee..3bde517a937 100644 --- a/boot/boot-stage-1-init.sh +++ b/boot/boot-stage-1-init.sh @@ -219,7 +219,7 @@ if test -n "@isLiveCD@"; then mkdir /mnt/tmpfs mount -n -t tmpfs -o "mode=755" none /mnt/tmpfs mkdir /mnt/union - mount -t unionfs -o dirs=/mnt/tmpfs=rw:$targetRoot=ro none /mnt/union + mount -t aufs -o dirs=/mnt/tmpfs=rw:$targetRoot=ro none /mnt/union targetRoot=/mnt/union fi diff --git a/configuration/rescue-cd.nix b/configuration/rescue-cd.nix index 435da04db16..2edfe78d9e9 100644 --- a/configuration/rescue-cd.nix +++ b/configuration/rescue-cd.nix @@ -15,9 +15,10 @@ rec { # The label used to identify the installation CD. rootLabel = "NIXOS"; extraTTYs = [7 8]; # manual, rogue + extraModulePackages = [pkgs.aufs]; initrd = { extraKernelModules = [ - "unionfs" # needed for live-CD operation + "aufs" # needed for live-CD operation ]; }; }; diff --git a/system/options.nix b/system/options.nix index bf7c38d4dc8..a50ab43929f 100644 --- a/system/options.nix +++ b/system/options.nix @@ -123,6 +123,14 @@ "; }; + extraModulePackages = mkOption { + default = []; + example = [pkgs.aufs pkgs.nvidiaDriver]; + description = '' + A list of additional packages supplying kernel modules. + ''; + }; + kernelModules = mkOption { default = []; description = " diff --git a/system/system.nix b/system/system.nix index 732ae7b8aa9..4bc22890cb1 100644 --- a/system/system.nix +++ b/system/system.nix @@ -43,7 +43,8 @@ rec { # Determine the set of modules that we need to mount the root FS. modulesClosure = import ../helpers/modules-closure.nix { inherit (pkgs) stdenv module_init_tools; - inherit kernel rootModules; + inherit rootModules; + kernel = modulesTree; }; @@ -148,9 +149,10 @@ rec { # directory. modulesTree = pkgs.module_aggregation ( [kernel] - ++ pkgs.lib.optional config.networking.enableIntel3945ABGFirmware pkgs.iwlwifi + ++ pkgs.lib.optional config.networking.enableIntel3945ABGFirmware pkgs.iwlwifi # !!! this should be declared by the xserver Upstart job. ++ pkgs.lib.optional (config.services.xserver.enable && config.services.xserver.videoDriver == "nvidia") pkgs.nvidiaDrivers + ++ config.boot.extraModulePackages );