summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2020-01-24 14:28:41 +0100
committerAlan Pearce2020-01-24 14:28:41 +0100
commit8b52a21a0493f8e822f2531ebaef50e261b70116 (patch)
tree2eb5cb4b1af407cef70e99a376bf714fbb09b5e7 /system
parent65af77332cf92701f177721dd01a60ff2a6566c4 (diff)
downloadnixfiles-8b52a21a0493f8e822f2531ebaef50e261b70116.tar.lz
nixfiles-8b52a21a0493f8e822f2531ebaef50e261b70116.tar.zst
nixfiles-8b52a21a0493f8e822f2531ebaef50e261b70116.zip
laptop: configure lid power actions
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;