From ea5de34fa9893370088b7bccc7331be30c85c647 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Mon, 20 Oct 2025 17:50:10 +0200 Subject: [PATCH] add suspend mode to thinkpad --- hosts/nixos/thinkpad/system.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hosts/nixos/thinkpad/system.nix b/hosts/nixos/thinkpad/system.nix index 5abd595..297dc7a 100644 --- a/hosts/nixos/thinkpad/system.nix +++ b/hosts/nixos/thinkpad/system.nix @@ -229,15 +229,16 @@ in }; }; - # Disable automatic sleep and screen timeout + # Suspend behavior configuration services.logind.settings = { Login = { - HandleLidSwitch = "ignore"; # Ignore lid close + HandleLidSwitch = "suspend"; # Suspend on lid close (battery only) HandleLidSwitchDocked = "ignore"; - HandleLidSwitchExternalPower = "ignore"; - HandleSuspendKey = "ignore"; + HandleLidSwitchExternalPower = "ignore"; # Don't suspend on lid close when on AC + HandlePowerKey = "suspend"; # Suspend on power button press + HandleSuspendKey = "suspend"; # Allow manual suspend from GNOME menu HandleHibernateKey = "ignore"; - IdleAction = "ignore"; + IdleAction = "ignore"; # No automatic idle suspend IdleActionSec = "0"; }; };