ctucx.git: nixfiles

ctucx' nixfiles

commit f604bb9b8db9e5406b8bc23ee89a0042d7cc3489
parent 4774016b33a4ce8a16e36edf2894b044ad36dd72
Author: Leah (ctucx) <git@ctu.cx>
Date: Sat, 17 Jun 2023 10:41:25 +0200

machines/briefkasten: disable shutdown on power-button press
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/machines/briefkasten/configuration.nix b/machines/briefkasten/configuration.nix
@@ -92,12 +92,18 @@
         ip route add default via 2a0f:4ac0:acab::1 dev enp1s0 onlink
       '';
     };
+
   };
 
   systemd.network.networks = {
     "40-enp1s0".networkConfig.IPv6AcceptRA = lib.mkIf config.networking.usePBBUplink false;
   };
 
+  services.logind.extraConfig = ''
+    # don’t shutdown when power button is short-pressed
+    HandlePowerKey=ignore
+  '';
+
   networking = {
     domain      = "home.ctu.cx";