mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/systemd: make sure all the device nodes are created in stage1
The ConditionFileNotEmpty override patch wasn't correct for stage1, which does have the modules in /lib. So, remove the patch and set the right path with overrides in the final system. Also, make sure systemd-tmpfiles-setup-dev is pulled in to create all the necessary symlinks.
This commit is contained in:
parent
f3bfbd3dc2
commit
c9183d3738
21 changed files with 56 additions and 126 deletions
|
@ -592,6 +592,12 @@ in
|
|||
systemd.services.systemd-importd.environment = proxy_env;
|
||||
systemd.services.systemd-pstore.wantedBy = [ "sysinit.target" ]; # see #81138
|
||||
|
||||
# NixOS has kernel modules in a different location, so override that here.
|
||||
systemd.services.kmod-static-nodes.unitConfig.ConditionFileNotEmpty = [
|
||||
"" # required to unset the previous value!
|
||||
"/run/booted-system/kernel-modules/lib/modules/%v/modules.devname"
|
||||
];
|
||||
|
||||
# Don't bother with certain units in containers.
|
||||
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
|
||||
systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
|
||||
|
|
|
@ -420,6 +420,9 @@ in {
|
|||
services."systemd-makefs@" = lib.mkIf needMakefs { unitConfig.IgnoreOnIsolate = true; };
|
||||
services."systemd-growfs@" = lib.mkIf needGrowfs { unitConfig.IgnoreOnIsolate = true; };
|
||||
|
||||
# make sure all the /dev nodes are set up
|
||||
services.systemd-tmpfiles-setup-dev.wantedBy = ["sysinit.target"];
|
||||
|
||||
services.initrd-nixos-activation = {
|
||||
after = [ "initrd-fs.target" ];
|
||||
requiredBy = [ "initrd.target" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue