about summary refs log tree commit diff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-07-30 00:11:55 +0200
committerGitHub <noreply@github.com>2023-07-30 00:11:55 +0200
commita2a7096157fa74d68bb11f866450aa1da1a8012f (patch)
treee0122fde969b43117587b2447d34c9a3e18c3d7d /nixos/modules/system/boot
parent0546c70849185664031cd6bb3f6b57e477fe1487 (diff)
parent4ecd0c119a391bd53035bcec79fb6902066d3f95 (diff)
Merge pull request #246082 from ElvishJerricco/exitrd-fix-shutdown-loop
systemd shutdownRamfs: Fix infinite shutdown loop
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/systemd/shutdown.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd/shutdown.nix b/nixos/modules/system/boot/systemd/shutdown.nix
index b4b750fa9aafe..d7300e940af20 100644
--- a/nixos/modules/system/boot/systemd/shutdown.nix
+++ b/nixos/modules/system/boot/systemd/shutdown.nix
@@ -30,7 +30,11 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    systemd.shutdownRamfs.contents."/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
+    systemd.shutdownRamfs.contents = {
+      "/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
+      "/etc/initrd-release".source = config.environment.etc.os-release.source;
+      "/etc/os-release".source = config.environment.etc.os-release.source;
+    };
     systemd.shutdownRamfs.storePaths = [pkgs.runtimeShell "${pkgs.coreutils}/bin"];
 
     systemd.mounts = [{