summary refs log tree commit diff stats
path: root/modules/hardware
diff options
context:
space:
mode:
authorAlan Pearce2019-08-28 16:48:30 +0200
committerAlan Pearce2019-08-28 16:48:30 +0200
commit66e0fc015b2325ac807747ea6b4c771a05c6ba63 (patch)
treedc43c4b40691c654fcfe87beb797334dbd0b1992 /modules/hardware
parent1c9f2e4f79c747724ff30da7a7c836ff6c5a8025 (diff)
downloadnixfiles-66e0fc015b2325ac807747ea6b4c771a05c6ba63.tar.lz
nixfiles-66e0fc015b2325ac807747ea6b4c771a05c6ba63.tar.zst
nixfiles-66e0fc015b2325ac807747ea6b4c771a05c6ba63.zip
laptop: run autorandr via acpid on lid events
Diffstat (limited to 'modules/hardware')
-rw-r--r--modules/hardware/laptop.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/hardware/laptop.nix b/modules/hardware/laptop.nix
index a1d27ee4..4c76ff6a 100644
--- a/modules/hardware/laptop.nix
+++ b/modules/hardware/laptop.nix
@@ -38,6 +38,13 @@
     IdleActionSec=600
   '';
 
+  services.acpid = {
+    enable = true;
+    lidEventCommands = ''
+      ${pkgs.autorandr}/bin/autorandr --batch --change
+    '';
+  };
+
   services.physlock = {
     enable = true;
     # Already need to enter disk encryption password