12 lines
278 B
Nix
12 lines
278 B
Nix
{ lib, config, ... }:
|
|
|
|
{
|
|
boot.resumeDevice = lib.optionalString ((lib.length config.swapDevices) > 0) (lib.head config.swapDevices).device;
|
|
services.logind = {
|
|
lidSwitch = "suspend-then-hibernate";
|
|
};
|
|
systemd.sleep.extraConfig = ''
|
|
HibernateDelaySec=30m
|
|
'';
|
|
}
|