From f0274b2346a1203a918eaf58c418ed96f0a5d126 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 27 Jun 2022 20:48:38 +0200 Subject: machines/leguin: ignore lid switch when connected --- machines/profpatsch/leguin.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'machines/profpatsch') 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; -- cgit 1.4.1