set up hibernate

This commit is contained in:
Rouven Seifert 2023-02-28 20:48:06 +01:00
parent d2b548cac2
commit 89604624c9
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
3 changed files with 25 additions and 8 deletions

View file

@ -108,6 +108,15 @@
user = "libvirtd";
};
};
services.logind = {
lidSwitch = "suspend-then-hibernate";
lidSwitchDocked = "hybrid-sleep";
lidSwitchExternalPower = "suspend";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=1h
'';
environment.systemPackages = with pkgs; [
wget