Add hibernate for laptop

This commit is contained in:
2026-02-25 01:14:42 +01:00
parent 84b57d81b5
commit 375ccff408
2 changed files with 16 additions and 0 deletions

View File

@@ -27,4 +27,19 @@
MEM_SLEEP_ON_BAT = "deep";
};
};
services.logind = {
# Use 'settings' for modern NixOS Unstable/Stable
settings = {
Login = {
HandleLidSwitch = "suspend-then-hibernate";
HandleLidSwitchExternalPower = "suspend";
HandleLidSwitchDocked = "ignore"; # Keeps external monitors alive
};
};
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=10min
'';
}