summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2022-06-16 16:38:29 +0200
committerAlan Pearce2022-06-16 16:38:29 +0200
commita846de8177cae01322f5f3af81e9ef64ecc963ba (patch)
treeed27e763a4383390f5dab265c887bde6a9fe03a4
parenta0f1382803a6c4ca93463928fef682346be9a894 (diff)
downloadnixfiles-a846de8177cae01322f5f3af81e9ef64ecc963ba.tar.lz
nixfiles-a846de8177cae01322f5f3af81e9ef64ecc963ba.tar.zst
nixfiles-a846de8177cae01322f5f3af81e9ef64ecc963ba.zip
bare-metal: automatically suspend when idle
-rw-r--r--system/settings/hardware/bare-metal.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/settings/hardware/bare-metal.nix b/system/settings/hardware/bare-metal.nix
index 7d995934..a60524c7 100644
--- a/system/settings/hardware/bare-metal.nix
+++ b/system/settings/hardware/bare-metal.nix
@@ -10,6 +10,12 @@
     usbutils
   ];
 
+  services.logind = {
+    extraConfig = ''
+      IdleAction=suspend
+      IdleActionSec=1800
+    '';
+  };
   services.udev.extraRules = ''
     # set scheduler for NVMe
     ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="none"