about summary refs log tree commit diff
path: root/machines/profpatsch
diff options
context:
space:
mode:
Diffstat (limited to 'machines/profpatsch')
-rw-r--r--machines/profpatsch/leguin.nix14
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;