9 cfg = config.services.uvcvideo;
11 uvcdynctrl-udev-rules =
13 pkgs.callPackage ./uvcdynctrl-udev-rules.nix {
23 services.uvcvideo.dynctrl = {
25 enable = lib.mkOption {
26 type = lib.types.bool;
29 Whether to enable {command}`uvcvideo` dynamic controls.
31 Note that enabling this brings the {command}`uvcdynctrl` tool
32 into your environment and register all dynamic controls from
33 specified {command}`packages` to the {command}`uvcvideo` driver.
37 packages = lib.mkOption {
38 type = lib.types.listOf lib.types.path;
39 example = lib.literalExpression "[ pkgs.tiscamera ]";
41 List of packages containing {command}`uvcvideo` dynamic controls
42 rules. All files found in
43 {file}`«pkg»/share/uvcdynctrl/data`
46 Note that these will serve as input to the {command}`libwebcam`
47 package which through its own {command}`udev` rule will register
48 the dynamic controls from specified packages to the {command}`uvcvideo`
51 apply = map lib.getBin;
56 config = lib.mkIf cfg.dynctrl.enable {
58 services.udev.packages = [
59 (uvcdynctrl-udev-rules cfg.dynctrl.packages)
62 environment.systemPackages = [