diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-07-08 21:37:08 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-07-08 22:04:40 +0200 |
commit | fc1e0e863c60dc9740304de36ffa883cbaddd760 (patch) | |
tree | b62a5c8ac3d3dacadade6009f8d35dd77080a077 /nixos | |
parent | 27b9fe1e53e0ce21f29cc4c351db67911f941017 (diff) |
nixos/ddccontrol: init
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/hardware/ddccontrol.nix | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 980e7027c98c..2b42eda4cf30 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -388,6 +388,7 @@ ./services/hardware/bluetooth.nix ./services/hardware/bolt.nix ./services/hardware/brltty.nix + ./services/hardware/ddccontrol.nix ./services/hardware/fancontrol.nix ./services/hardware/freefall.nix ./services/hardware/fwupd.nix diff --git a/nixos/modules/services/hardware/ddccontrol.nix b/nixos/modules/services/hardware/ddccontrol.nix new file mode 100644 index 000000000000..766bf12ee9f0 --- /dev/null +++ b/nixos/modules/services/hardware/ddccontrol.nix @@ -0,0 +1,36 @@ +{ config +, lib +, pkgs +, ... +}: + +let + cfg = config.services.ddccontrol; +in + +{ + ###### interface + + options = { + services.ddccontrol = { + enable = lib.mkEnableOption "ddccontrol for controlling displays"; + }; + }; + + ###### implementation + + config = lib.mkIf cfg.enable { + # Give users access to the "gddccontrol" tool + environment.systemPackages = [ + pkgs.ddccontrol + ]; + + services.dbus.packages = [ + pkgs.ddccontrol + ]; + + systemd.packages = [ + pkgs.ddccontrol + ]; + }; +} |