lol

systemd shutdownRamfs: Fix infinite shutdown loop

+6 -2
+5 -1
nixos/modules/system/boot/systemd/shutdown.nix
··· 30 30 }; 31 31 32 32 config = lib.mkIf cfg.enable { 33 - systemd.shutdownRamfs.contents."/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown"; 33 + systemd.shutdownRamfs.contents = { 34 + "/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown"; 35 + "/etc/initrd-release".source = config.environment.etc.os-release.source; 36 + "/etc/os-release".source = config.environment.etc.os-release.source; 37 + }; 34 38 systemd.shutdownRamfs.storePaths = [pkgs.runtimeShell "${pkgs.coreutils}/bin"]; 35 39 36 40 systemd.mounts = [{
+1 -1
nixos/tests/systemd-shutdown.nix
··· 22 22 machine.wait_for_console_text("Unmounting '/oldroot'") 23 23 machine.wait_for_console_text("${msg}") 24 24 # Don't try to sync filesystems 25 - machine.booted = False 25 + machine.wait_for_shutdown() 26 26 ''; 27 27 })