diff --git a/modules/nixos/hardware/sleep.nix b/modules/nixos/hardware/sleep.nix index cd794a4..146e459 100644 --- a/modules/nixos/hardware/sleep.nix +++ b/modules/nixos/hardware/sleep.nix @@ -8,6 +8,10 @@ config = lib.mkIf (config.physical && !config.server) { + # Use power button to sleep instead of poweroff + services.logind.powerKey = "suspend"; + services.logind.powerKeyLongPress = "poweroff"; + # Prevent wake from keyboard powerManagement.powerDownCommands = '' set +e