diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index e3fadf592925..572c6558ac96 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -515,7 +515,7 @@ in { RequiresMountsFor = "/sysroot/nix/store"; DefaultDependencies = false; }; - before = [ "shutdown.target" ]; + before = [ "initrd.target" "shutdown.target" ]; conflicts = [ "shutdown.target" ]; requiredBy = [ "initrd.target" ]; serviceConfig = {