diff options
author | Will Fancher <elvishjerricco@gmail.com> | 2023-07-28 18:52:48 -0400 |
---|---|---|
committer | Will Fancher <elvishjerricco@gmail.com> | 2023-07-29 13:52:52 -0400 |
commit | 4ecd0c119a391bd53035bcec79fb6902066d3f95 (patch) | |
tree | fbad45ddc301e0b2e86b3c641a9bfcbfce7b3cc0 /nixos/modules/system/boot | |
parent | 66ce081fafa2dca0038006ec7c6482d7a11d13d8 (diff) |
systemd shutdownRamfs: Fix infinite shutdown loop
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/systemd/shutdown.nix | 6 |
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 = [{ |