From b798b0d694c8419080da217491714e3e37b94f2d Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Mon, 18 Nov 2024 21:12:08 -0500 Subject: [PATCH] nixos/systemd-stage-1: nixos-find-nixos-closure before initrd.target Without this, boot could proceed to the initrd cleanup step before the closure was found, killing the service and breaking boot. (cherry picked from commit af8279fe38a2b7957563d253a83156be922b5265) --- nixos/modules/system/boot/systemd/initrd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {