powerManagement: configure power button and screenlock
This commit is contained in:
parent
4e59145aed
commit
4ec35cd3bb
|
@ -15,6 +15,12 @@
|
|||
logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
lidSwitchDocked = "ignore";
|
||||
# powerKey = "suspend-then-hibernate"; # Enable in 23.11
|
||||
extraConfig = ''
|
||||
HandlePowerKey=suspend-then-hibernate
|
||||
IdleAction=suspend-then-hibernate
|
||||
IdleActionSec=10m
|
||||
'';
|
||||
};
|
||||
thermald.enable = true;
|
||||
auto-cpufreq = {
|
||||
|
@ -37,4 +43,14 @@
|
|||
criticalPowerAction = "Hibernate";
|
||||
};
|
||||
};
|
||||
|
||||
programs.xss-lock = {
|
||||
enable = true;
|
||||
lockerCommand = "${pkgs.xscreensaver}/bin/screensaver-command -lock";
|
||||
extraOptions = [
|
||||
"-n ${pkgs.libnotify}/bin/notify-send \"Locking screen now\""
|
||||
"IdleAction=lock"
|
||||
"IdleActionSec=5m"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue