mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
24 lines
323 B
Nix
24 lines
323 B
Nix
|
{bash}:
|
||
|
|
||
|
{
|
||
|
name = "sys-halt";
|
||
|
|
||
|
job = "
|
||
|
start on reboot
|
||
|
start on halt
|
||
|
start on system-halt
|
||
|
start on power-off
|
||
|
|
||
|
script
|
||
|
exec < /dev/tty1 > /dev/tty1 2>&1
|
||
|
echo \"\"
|
||
|
echo \"<<< SYSTEM SHUTDOWN >>>\"
|
||
|
echo \"\"
|
||
|
|
||
|
# Right now all events above power off the system.
|
||
|
exec halt -f -p
|
||
|
end script
|
||
|
";
|
||
|
|
||
|
}
|