summary refs log tree commit diff stats
path: root/sys/services/logind
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-07-01 09:45:20 +0200
committersils <sils@sils.li>2023-07-01 09:45:20 +0200
commit45d1cb8c894dc2e3da791e13ec5d567610df4563 (patch)
treed359e422d30b417fc4068326f1c439385f290067 /sys/services/logind
parentFeat(sys): Add systemd HibernateDelaySec (diff)
downloadnix-config-45d1cb8c894dc2e3da791e13ec5d567610df4563.tar.gz
nix-config-45d1cb8c894dc2e3da791e13ec5d567610df4563.zip
Feat(sys/services): Add logind configuration
Diffstat (limited to '')
-rw-r--r--sys/services/logind/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/services/logind/default.nix b/sys/services/logind/default.nix
new file mode 100644
index 0000000..a3dd040
--- /dev/null
+++ b/sys/services/logind/default.nix
@@ -0,0 +1,10 @@
+{...}: {
+  services.logind = {
+    lidSwitch = "suspend-then-hibernate";
+    extraConfig = ''
+      IdleAction=ignore
+      HandlePowerKey=hibernate
+      HandlePowerKeyLongPress=poweroff
+    '';
+  };
+}