From d845c4f144b19435a6abf9e328746c2b4150282f Mon Sep 17 00:00:00 2001 From: kiana-S Date: Thu, 21 Sep 2023 23:42:40 -0400 Subject: [PATCH] Inhibit logind from handling power button inputs This prevents the computer from immediately shutting down when the power button is pressed. --- config/config.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/config.nix b/config/config.nix index 5662768..89846c1 100644 --- a/config/config.nix +++ b/config/config.nix @@ -28,6 +28,14 @@ in networking.wireless.enable = false; networking.networkmanager.enable = true; + # Power button settings + services.logind = { + extraConfig = '' + HandlePowerKey=ignore + HandlePowerKeyLongPress=poweroff + ''; + }; + # Set your time zone. time.timeZone = "America/New_York";