nix-git/modules/lid-switch-handling.nix
2023-10-09 13:06:17 +02:00

10 lines
288 B
Nix

{ config, pkgs, ... }:
{
# Don't suspend if laptop lid is closed while plugged in.
# https://unix.stackexchange.com/a/307498
#
# services.logind.lidSwitch = "suspend";
services.logind.lidSwitchExternalPower = "lock";
#services.logind.lidSwitchDocked = "ignore";
}