summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-11-12 00:02:56 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-11-12 00:02:56 +0100
commit37b87bd5a4b85b154e298a9c083bb7eaee10065e (patch)
tree0733692374afc2edf17124a3ac629f2b3a5af746
parent1c507f85474cc70348d319071cbc6c1626a183a3 (diff)
downloadnixos-37b87bd5a4b85b154e298a9c083bb7eaee10065e.tar
nixos-37b87bd5a4b85b154e298a9c083bb7eaee10065e.tar.gz
nixos-37b87bd5a4b85b154e298a9c083bb7eaee10065e.tar.bz2
nixos-37b87bd5a4b85b154e298a9c083bb7eaee10065e.tar.xz
nixos-37b87bd5a4b85b154e298a9c083bb7eaee10065e.zip
Make autorandr system wide and automatic
-rw-r--r--hel.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/hel.nix b/hel.nix
index 3d7fdb79..6f7122ca 100644
--- a/hel.nix
+++ b/hel.nix
@@ -477,6 +477,9 @@
477 }; 477 };
478 }; 478 };
479 479
480 services.udev.packages = with pkgs; [ autorandr ];
481 systemd.packages = with pkgs; [ autorandr ];
482
480 services.udev.extraRules = with pkgs; '' 483 services.udev.extraRules = with pkgs; ''
481 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service" 484 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block stop ac-plugged.service"
482 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" 485 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service"