blob: 89c880973d80a516a8565c839f9969d51b1fffeb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{ config, lib, pkgs, ... }:
{
services.logind = {
powerKey = "hibernate";
powerKeyLongPress = "poweroff";
lidSwitch = "suspend-then-hibernate";
lidSwitchExternalPower = "ignore";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
SuspendState=mem
'';
services.tlp.enable = true;
services.upower = {
enable = true;
criticalPowerAction = "Hibernate";
percentageAction = 3;
};
}
|