From 37b87bd5a4b85b154e298a9c083bb7eaee10065e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 12 Nov 2017 00:02:56 +0100 Subject: Make autorandr system wide and automatic --- hel.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hel.nix b/hel.nix index 3d7fdb79..6f7122ca 100644 --- a/hel.nix +++ b/hel.nix @@ -477,6 +477,9 @@ }; }; + services.udev.packages = with pkgs; [ autorandr ]; + systemd.packages = with pkgs; [ autorandr ]; + services.udev.extraRules = with pkgs; '' SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" -- cgit v1.2.3