about summary refs log tree commit diff
path: root/machines/profpatsch
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-06-27 20:49:00 +0200
committerProfpatsch <mail@profpatsch.de>2022-06-27 20:49:00 +0200
commitcd12dbd5d814f809dfabc815a76218eae1c607a1 (patch)
tree6699b4a0dae40f621d4ce75cb0e8279a512b75e0 /machines/profpatsch
parentf0274b2346a1203a918eaf58c418ed96f0a5d126 (diff)
machines/shiki: ignore short press on power button
Diffstat (limited to 'machines/profpatsch')
-rw-r--r--machines/profpatsch/shiki.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/machines/profpatsch/shiki.nix b/machines/profpatsch/shiki.nix
index fdb595f1..ca62cf85 100644
--- a/machines/profpatsch/shiki.nix
+++ b/machines/profpatsch/shiki.nix
@@ -356,10 +356,17 @@ in {
     # Automount
     services.udisks2.enable = true;
 
-    services.logind.extraConfig = ''
+    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";
+
       # want to be able to listen to music while laptop closed
-      LidSwitchIgnoreInhibited=no
-    '';
+      LidSwitchIgnoreInhibited = "no";
+
+    };
 
     # TMP