summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/settings/hardware/laptop.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/system/settings/hardware/laptop.nix b/system/settings/hardware/laptop.nix
index aca900a6..24e7db86 100644
--- a/system/settings/hardware/laptop.nix
+++ b/system/settings/hardware/laptop.nix
@@ -41,10 +41,14 @@
     target = "xdg/autorandr";
   };
 
-  services.logind.extraConfig = ''
-    IdleAction=suspend
-    IdleActionSec=600
-  '';
+  services.logind = {
+    lidSwitch = "suspend";
+    lidSwitchExternalPower = "ignore";
+    extraConfig = ''
+      IdleAction=suspend
+      IdleActionSec=600
+    '';
+  };
 
   services.acpid = {
     enable = true;