mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
34 lines
545 B
Nix
34 lines
545 B
Nix
{ 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 ];
|
|
|
|
systemd.packages = [ pkgs.autorandr ];
|
|
|
|
systemd.services.autorandr = {
|
|
wantedBy = [ "sleep.target" ];
|
|
};
|
|
|
|
};
|
|
|
|
meta.maintainers = with maintainers; [ gnidorah ];
|
|
}
|