NixOS/nixos — pull request #101 by bjornfor (2013-02-24 14:07:30+00:00)
Title: systemd: add logind options for power management

(NOTE: I haven't completely verified this by testing because my nixos system runs Xfce which overrides power management. Maybe a comment about DEs overriding these settings are in order, but I don't know where that comment should be placed.)

Make the following logind power management options configurable in
NixOS:

HandleHibernateKey=
HandleLidSwitch=
HandlePowerKey=
HandleSuspendKey=

All options use the same default values as upstream[1], so this commit
should not make logind behave any different than before (unless the
options are changed).

Example usage (in configuration.nix):
# Possible values: ignore, poweroff, reboot, halt, kexec, suspend,
# hibernate, hybrid-sleep and lock
services.logind.HandleLidSwitch = "ignore";

[1]: http://www.freedesktop.org/software/systemd/man/logind.conf.html