Inhibit logind from handling power button inputs

This prevents the computer from immediately shutting down when the power
button is pressed.
This commit is contained in:
Kiana Sheibani 2023-09-21 23:42:40 -04:00
parent a41f4be8fb
commit d845c4f144

View file

@ -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";