From deb045e05755918cdf77f6ecb9da96cba9e7dbef Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Mon, 17 Mar 2025 16:22:39 +0100 Subject: [PATCH] initrd: implement panic-on-fail interpreterless --- nixos/modules/system/boot/systemd/initrd.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index 472c72fb3889..e731814bd5d4 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -703,10 +703,11 @@ in "|stage1panic" ]; }; - script = '' - echo c > /proc/sysrq-trigger - ''; - serviceConfig.Type = "oneshot"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.coreutils}/bin/echo c"; + StandardOutput = "file:/proc/sysrq-trigger"; + }; }; }; };