b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
39 lines
604 B
Nix
39 lines
604 B
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, ...
|
|
}:
|
|
|
|
let
|
|
cfg = config.services.ddccontrol;
|
|
in
|
|
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
services.ddccontrol = {
|
|
enable = lib.mkEnableOption (lib.mdDoc "ddccontrol for controlling displays");
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# Load the i2c-dev module
|
|
boot.kernelModules = [ "i2c_dev" ];
|
|
|
|
# Give users access to the "gddccontrol" tool
|
|
environment.systemPackages = [
|
|
pkgs.ddccontrol
|
|
];
|
|
|
|
services.dbus.packages = [
|
|
pkgs.ddccontrol
|
|
];
|
|
|
|
systemd.packages = [
|
|
pkgs.ddccontrol
|
|
];
|
|
};
|
|
}
|