diff --git a/hosts/doloro-laptop/laptop.nix b/hosts/doloro-laptop/laptop.nix index 89117a4..b56d83f 100644 --- a/hosts/doloro-laptop/laptop.nix +++ b/hosts/doloro-laptop/laptop.nix @@ -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; }