configuration/desktop: setup hibernate
This commit is contained in:
11
configuration/desktop/power.nix
Normal file
11
configuration/desktop/power.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
boot.resumeDevice = (lib.head config.swapDevices).device;
|
||||
services.logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
};
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=30m
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user