diff options
author | Profpatsch <mail@profpatsch.de> | 2022-06-27 20:48:38 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2022-06-27 20:48:38 +0200 |
commit | f0274b2346a1203a918eaf58c418ed96f0a5d126 (patch) | |
tree | 2a3912480e0f39040ea4881db588434dd9b77452 | |
parent | f4083c40b6a312db6c293f345b556066523f5d49 (diff) |
machines/leguin: ignore lid switch when connected
-rw-r--r-- | machines/profpatsch/leguin.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/machines/profpatsch/leguin.nix b/machines/profpatsch/leguin.nix index 2eb8f84b..7b1364ec 100644 --- a/machines/profpatsch/leguin.nix +++ b/machines/profpatsch/leguin.nix @@ -76,6 +76,20 @@ in }; + services.logind.extraConfig = lib.generators.toKeyValue {} { + + # I don’t want the machine to go off immediately + # when I accidentally touch the power button. + HandlePowerKey = "ignore"; + HandlePowerKeyLongPress = "poweroff"; + + # as long as the machine is connected to power, + # it needs to be closed to preserve the monitor + HandleLidSwitchExternalPower = "ignore"; + HandleLidSwitchDocked = "ignore"; + + }; + services.tailscale = { enable = true; interfaceName = tailscaleInterface; |