wip: power management

This commit is contained in:
2025-12-24 18:46:03 +00:00
parent 2261876326
commit 90bb720391

View File

@@ -16,9 +16,12 @@
services.upower = {
enable = true;
};
services.logind.extraConfig = {
HandlePowerKey = "hibernate"; # Hibernate when the power button is pressed
HandleLidSwitch = "hibernate"; # Hibernate when the lid is closed
services.logind.settings.Login = {
HandleLidSwitch = "hibernate";
HandleLidSwitchExternalPower = "lock";
HandleLidSwitchDocked = "ignore";
};
# one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate", "lock"
powerManagement.enable = true;
}