mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
committed by
Dmitry Kalinkin
parent
24ca69c906
commit
63ee5cd99a
@@ -383,6 +383,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
|
||||
|
||||
36
nixos/modules/services/hardware/ddccontrol.nix
Normal file
36
nixos/modules/services/hardware/ddccontrol.nix
Normal file
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user