summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2018-01-08 16:13:28 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-02-16 00:11:07 +0200
commit56e0943b0855c7b0501f84d4ce43e083b9d13b27 (patch)
tree1a88c0e3a7980e0eafbf538199f1cf2436a9c75a /nixos/modules/system
parent0be2746fc2626fe26a34f2f729ce61aa440f8b97 (diff)
downloadnixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar.gz
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar.bz2
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar.lz
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar.xz
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.tar.zst
nixlib-56e0943b0855c7b0501f84d4ce43e083b9d13b27.zip
makeModulesClosure: support firmware
Link it in stage 1.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh1
-rw-r--r--nixos/modules/system/boot/stage-1.nix2
2 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index b442386914ad..964ec68cfe2f 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -167,6 +167,7 @@ done
 # Load the required kernel modules.
 mkdir -p /lib
 ln -s @modulesClosure@/lib/modules /lib/modules
+ln -s @modulesClosure@/lib/firmware /lib/firmware
 echo @extraUtils@/bin/modprobe > /proc/sys/kernel/modprobe
 for i in @kernelModules@; do
     echo "loading module $(basename $i)..."
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index d6e3e3a87d01..df450be8c401 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -13,12 +13,14 @@ let
 
   kernelPackages = config.boot.kernelPackages;
   modulesTree = config.system.modulesTree;
+  firmware = config.hardware.firmware;
 
 
   # Determine the set of modules that we need to mount the root FS.
   modulesClosure = pkgs.makeModulesClosure {
     rootModules = config.boot.initrd.availableKernelModules ++ config.boot.initrd.kernelModules;
     kernel = modulesTree;
+    firmware = firmware;
     allowMissing = true;
   };