1
0
nixfiles/configuration/desktop/power.nix

12 lines
278 B
Nix
Raw Normal View History

2023-06-19 22:45:01 +02:00
{ lib, config, ... }:
{
2023-09-23 17:55:26 +02:00
boot.resumeDevice = lib.optionalString ((lib.length config.swapDevices) > 0) (lib.head config.swapDevices).device;
2023-06-19 22:45:01 +02:00
services.logind = {
lidSwitch = "suspend-then-hibernate";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
'';
}