nix-git/modules/lid-switch-handling.nix

10 lines
288 B
Nix
Raw Normal View History

2023-09-16 17:23:06 +02:00
{ config, pkgs, ... }:
{
# Don't suspend if laptop lid is closed while plugged in.
# https://unix.stackexchange.com/a/307498
#
# services.logind.lidSwitch = "suspend";
2023-09-16 17:33:43 +02:00
services.logind.lidSwitchExternalPower = "lock";
2023-09-16 17:23:06 +02:00
#services.logind.lidSwitchDocked = "ignore";
}