diff --git a/configuration/desktop/default.nix b/configuration/desktop/default.nix index 0924e53..8eac2b1 100644 --- a/configuration/desktop/default.nix +++ b/configuration/desktop/default.nix @@ -4,6 +4,7 @@ imports = [ ./fonts.nix ./gnome.nix + ./power.nix ./xserver.nix ]; diff --git a/configuration/desktop/power.nix b/configuration/desktop/power.nix new file mode 100644 index 0000000..31f6039 --- /dev/null +++ b/configuration/desktop/power.nix @@ -0,0 +1,11 @@ +{ lib, config, ... }: + +{ + boot.resumeDevice = (lib.head config.swapDevices).device; + services.logind = { + lidSwitch = "suspend-then-hibernate"; + }; + systemd.sleep.extraConfig = '' + HibernateDelaySec=30m + ''; +}