1 { config, lib, pkgs, ... }:
4 cfg = config.services.uvcvideo;
6 uvcdynctrl-udev-rules = packages: pkgs.callPackage ./uvcdynctrl-udev-rules.nix {
16 services.uvcvideo.dynctrl = {
18 enable = lib.mkOption {
19 type = lib.types.bool;
22 Whether to enable {command}`uvcvideo` dynamic controls.
24 Note that enabling this brings the {command}`uvcdynctrl` tool
25 into your environment and register all dynamic controls from
26 specified {command}`packages` to the {command}`uvcvideo` driver.
30 packages = lib.mkOption {
31 type = lib.types.listOf lib.types.path;
32 example = lib.literalExpression "[ pkgs.tiscamera ]";
34 List of packages containing {command}`uvcvideo` dynamic controls
35 rules. All files found in
36 {file}`«pkg»/share/uvcdynctrl/data`
39 Note that these will serve as input to the {command}`libwebcam`
40 package which through its own {command}`udev` rule will register
41 the dynamic controls from specified packages to the {command}`uvcvideo`
44 apply = map lib.getBin;
49 config = lib.mkIf cfg.dynctrl.enable {
51 services.udev.packages = [
52 (uvcdynctrl-udev-rules cfg.dynctrl.packages)
55 environment.systemPackages = [