configuration/desktop: setup hibernate
This commit is contained in:
parent
3ec434470a
commit
abfafdd0af
@ -4,6 +4,7 @@
|
||||
imports = [
|
||||
./fonts.nix
|
||||
./gnome.nix
|
||||
./power.nix
|
||||
./xserver.nix
|
||||
];
|
||||
|
||||
|
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user