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