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
|
|
|
|
'';
|
|
|
|
}
|