2009-10-12 18:36:19 +02:00
|
|
|
{ config, pkgs, ... }:
|
2009-03-06 13:27:45 +01:00
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2006-11-24 01:34:50 +01:00
|
|
|
{
|
2009-11-06 20:20:09 +01:00
|
|
|
jobs.control_alt_delete =
|
|
|
|
{ name = "control-alt-delete";
|
2006-11-24 01:34:50 +01:00
|
|
|
|
2009-11-06 20:20:09 +01:00
|
|
|
startOn = "control-alt-delete";
|
2009-10-12 18:36:19 +02:00
|
|
|
|
|
|
|
task = true;
|
|
|
|
|
|
|
|
script =
|
|
|
|
''
|
|
|
|
shutdown -r now 'Ctrl-Alt-Delete pressed'
|
|
|
|
'';
|
|
|
|
};
|
2010-10-05 19:58:58 +02:00
|
|
|
|
|
|
|
system.activationScripts.poweroff =
|
|
|
|
''
|
|
|
|
# Allow the kernel to find the poweroff command. This is used
|
|
|
|
# (for instance) by Xen's "xm shutdown" command to signal a
|
|
|
|
# guest to shut down cleanly.
|
|
|
|
echo ${config.system.build.upstart}/sbin/poweroff > /proc/sys/kernel/poweroff_cmd
|
|
|
|
'';
|
2006-11-24 01:34:50 +01:00
|
|
|
}
|