diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2023-12-03 14:14:32 -0500 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2023-12-11 21:00:08 -0500 |
commit | a514d8c148e78d0d222689bdae55d242e0ff454e (patch) | |
tree | 03cfe728ed1d086ad1291a72429bbbae27c45eeb /nixos/modules/system | |
parent | d6a0fea30ee3921729a2d62611cd7f097f4d0409 (diff) | |
download | nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar.gz nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar.bz2 nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar.lz nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar.xz nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.tar.zst nixlib-a514d8c148e78d0d222689bdae55d242e0ff454e.zip |
systemd-stage-1: allow non-existent /lib/firmware
Since 1557027, makeModulesClosure doesn't create a lib/firmware directory if there is no firmware in the initramfs. If this happens, systemd-stage-1 fails to build. /lib only contains /lib/modules and /lib/firmware, both of while are from modulesClosure. Therefore, we can just add the entirety of ${modulesClosure}/lib to the initramfs to allow for the possibility that lib/firmware doesn't exist. This also brings systemd-stage-1 in line with the traditional stage-1.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd/initrd.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 0e7d59b32075..7e67eb424448 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -398,8 +398,7 @@ in { ManagerEnvironment=${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "${n}=${lib.escapeShellArg v}") cfg.managerEnvironment)} ''; - "/lib/modules".source = "${modulesClosure}/lib/modules"; - "/lib/firmware".source = "${modulesClosure}/lib/firmware"; + "/lib".source = "${modulesClosure}/lib"; "/etc/modules-load.d/nixos.conf".text = concatStringsSep "\n" config.boot.initrd.kernelModules; |