From f8f9985bd8fd81e2850091108bc6ba009ca31a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 6 Sep 2025 08:04:12 -0600 Subject: [PATCH] feat(sydpc): Sleep on power button --- hosts/sydpc/configuration.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hosts/sydpc/configuration.nix b/hosts/sydpc/configuration.nix index 3de2b85..bed0afd 100644 --- a/hosts/sydpc/configuration.nix +++ b/hosts/sydpc/configuration.nix @@ -58,12 +58,19 @@ # Disable systemd-sleep. Let KDE or whatever dim the screen without # suspending the computer. - systemd.sleep.extraConfig = '' - AllowSuspend=no - AllowHibernation=no - AllowHybridSleep=no - AllowSuspendThenHibernate=no - ''; + # systemd.sleep.extraConfig = '' + # AllowSuspend=no + # AllowHibernation=no + # AllowHybridSleep=no + # AllowSuspendThenHibernate=no + # ''; + + # Make pressing the power button suspend the system. + services.logind = { + extraConfig = '' + HandlePowerKey=suspend + ''; + }; boot.loader = { grub.enable = false;