summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2022-08-31 15:28:06 +0200
committerAlan Pearce2022-08-31 15:28:06 +0200
commit757fad0adad537b44b57068049aed7092043cfd3 (patch)
treeb149a5e0ad98f7c8ccdf60e22814e00470e69665 /system
parent0d5d8a2e2ee5e7f7992b70486abb44a1de1cb664 (diff)
downloadnixfiles-757fad0adad537b44b57068049aed7092043cfd3.tar.lz
nixfiles-757fad0adad537b44b57068049aed7092043cfd3.tar.zst
nixfiles-757fad0adad537b44b57068049aed7092043cfd3.zip
bare-metal: configure power button to suspend on short press
Diffstat (limited to 'system')
-rw-r--r--system/settings/hardware/bare-metal.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/system/settings/hardware/bare-metal.nix b/system/settings/hardware/bare-metal.nix
index a60524c7..ce8e57e2 100644
--- a/system/settings/hardware/bare-metal.nix
+++ b/system/settings/hardware/bare-metal.nix
@@ -14,6 +14,9 @@
     extraConfig = ''
       IdleAction=suspend
       IdleActionSec=1800
+      HandlePowerKey=suspend
+      HandlePowerKeyLongPress=poweroff
+      PowerKeyIgnoreInhibited=yes
     '';
   };
   services.udev.extraRules = ''