all repos — nixfiles @ 757fad0adad537b44b57068049aed7092043cfd3

System and user configuration, managed by nix and home-manager

bare-metal: configure power button to suspend on short press
Alan Pearce alan@alanpearce.eu
Wed, 31 Aug 2022 15:28:06 +0200
commit

757fad0adad537b44b57068049aed7092043cfd3

parent

0d5d8a2e2ee5e7f7992b70486abb44a1de1cb664

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M system/settings/hardware/bare-metal.nixsystem/settings/hardware/bare-metal.nix
@@ -14,6 +14,9 @@ services.logind = {     extraConfig = ''
       IdleAction=suspend
       IdleActionSec=1800
+      HandlePowerKey=suspend
+      HandlePowerKeyLongPress=poweroff
+      PowerKeyIgnoreInhibited=yes
     '';
   };
   services.udev.extraRules = ''