From 66e0fc015b2325ac807747ea6b4c771a05c6ba63 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 28 Aug 2019 16:48:30 +0200 Subject: laptop: run autorandr via acpid on lid events --- modules/hardware/laptop.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules') 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 -- cgit 1.4.1