From b64c84870e2ce7c6451098bddf70b013258c77ee Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 26 Mar 2024 17:24:31 -0400 Subject: [PATCH] system: don't shutdown when power button is short-pressed --- system/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/default.nix b/system/default.nix index 74a8a05f..39d9eafe 100644 --- a/system/default.nix +++ b/system/default.nix @@ -34,6 +34,12 @@ keyboard.qmk.enable = true; }; + services.logind.extraConfig = '' + # don't shutdown when power button is short-pressed + HandlePowerKey=suspend + HandlePowerKeyLongPress=poweroff + ''; + security.polkit.enable = true; # Allow unfree packages