tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
systemd shutdownRamfs: Fix infinite shutdown loop
Will Fancher
2 years ago
4ecd0c11
66ce081f
+6
-2
2 changed files
expand all
collapse all
unified
split
nixos
modules
system
boot
systemd
shutdown.nix
tests
systemd-shutdown.nix
+5
-1
nixos/modules/system/boot/systemd/shutdown.nix
···
30
30
};
31
31
32
32
config = lib.mkIf cfg.enable {
33
33
-
systemd.shutdownRamfs.contents."/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
33
33
+
systemd.shutdownRamfs.contents = {
34
34
+
"/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
35
35
+
"/etc/initrd-release".source = config.environment.etc.os-release.source;
36
36
+
"/etc/os-release".source = config.environment.etc.os-release.source;
37
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
25
-
machine.booted = False
25
25
+
machine.wait_for_shutdown()
26
26
'';
27
27
})