summary refs log tree commit diff stats
path: root/modules/hardware
diff options
context:
space:
mode:
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