all repos — nixfiles @ 66e0fc015b2325ac807747ea6b4c771a05c6ba63

System and user configuration, managed by nix and home-manager

laptop: run autorandr via acpid on lid events
Alan Pearce alan@alanpearce.eu
Wed, 28 Aug 2019 16:48:30 +0200
commit

66e0fc015b2325ac807747ea6b4c771a05c6ba63

parent

1c9f2e4f79c747724ff30da7a7c836ff6c5a8025

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M modules/hardware/laptop.nixmodules/hardware/laptop.nix
@@ -38,6 +38,13 @@ IdleAction=suspend     IdleActionSec=600
   '';
 
+  services.acpid = {
+    enable = true;
+    lidEventCommands = ''
+      ${pkgs.autorandr}/bin/autorandr --batch --change
+    '';
+  };
+
   services.physlock = {
     enable = true;
     # Already need to enter disk encryption password