From 4fa8726a447f1925d9eb27ee553ce84560fce605 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 24 Aug 2024 22:05:31 +0200 Subject: [PATCH] nixos/hardware.uvcvideo: remove `with lib;` --- .../hardware/video/uvcvideo/default.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/nixos/modules/hardware/video/uvcvideo/default.nix b/nixos/modules/hardware/video/uvcvideo/default.nix index 901ff938d90e..8b9f1244e5b5 100644 --- a/nixos/modules/hardware/video/uvcvideo/default.nix +++ b/nixos/modules/hardware/video/uvcvideo/default.nix @@ -1,8 +1,4 @@ - { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.uvcvideo; @@ -19,8 +15,8 @@ in options = { services.uvcvideo.dynctrl = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable {command}`uvcvideo` dynamic controls. @@ -31,9 +27,9 @@ in ''; }; - packages = mkOption { - type = types.listOf types.path; - example = literalExpression "[ pkgs.tiscamera ]"; + packages = lib.mkOption { + type = lib.types.listOf lib.types.path; + example = lib.literalExpression "[ pkgs.tiscamera ]"; description = '' List of packages containing {command}`uvcvideo` dynamic controls rules. All files found in @@ -45,12 +41,12 @@ in the dynamic controls from specified packages to the {command}`uvcvideo` driver. ''; - apply = map getBin; + apply = map lib.getBin; }; }; }; - config = mkIf cfg.dynctrl.enable { + config = lib.mkIf cfg.dynctrl.enable { services.udev.packages = [ (uvcdynctrl-udev-rules cfg.dynctrl.packages)