mirror of
https://github.com/JaxTheWolf/nixos.git
synced 2026-04-01 02:00:22 +02:00
Add hibernate for laptop
This commit is contained in:
@@ -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
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user