Skip to content

Commit 6cfd95f

Browse files
nixos/systemd-stage-1: Order nixos activation after initrd-switch-root.target
Now it's placed between initrd-switch-root.target and initrd-switch-root.service, meaning it is truly the last thing to happen before switch-root, as it should be.
1 parent f065a81 commit 6cfd95f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

nixos/modules/system/boot/systemd/initrd.nix

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,10 @@ in {
581581
];
582582

583583
services.initrd-nixos-activation = {
584-
requires = [
585-
config.boot.initrd.systemd.services.initrd-find-nixos-closure.name
586-
];
587-
after = [
588-
"initrd-fs.target"
589-
config.boot.initrd.systemd.services.initrd-find-nixos-closure.name
590-
];
591-
requiredBy = [ "initrd.target" ];
584+
after = [ "initrd-switch-root.target" ];
585+
requiredBy = [ "initrd-switch-root.service" ];
586+
before = [ "initrd-switch-root.service" ];
587+
unitConfig.DefaultDependencies = false;
592588
unitConfig = {
593589
AssertPathExists = "/etc/initrd-release";
594590
RequiresMountsFor = [

0 commit comments

Comments
 (0)