2017-04-06 10:03:31 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.autorandr;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.autorandr = {
|
|
|
|
enable = mkEnableOption "handling of hotplug and sleep events by autorandr";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.udev.packages = [ pkgs.autorandr ];
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.autorandr ];
|
|
|
|
|
2017-06-07 10:23:36 +00:00
|
|
|
systemd.packages = [ pkgs.autorandr ];
|
|
|
|
|
2017-04-06 10:03:31 +00:00
|
|
|
systemd.services.autorandr = {
|
|
|
|
wantedBy = [ "sleep.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|