From bbe907f0a9632e0a814ef41e30890286d3f68fab Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 24 Aug 2024 22:05:31 +0200 Subject: [PATCH] nixos/hardware.facetimehd: remove `with lib;` --- nixos/modules/hardware/video/webcam/facetimehd.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/hardware/video/webcam/facetimehd.nix b/nixos/modules/hardware/video/webcam/facetimehd.nix index 1e6e6442c372..06391ea5425e 100644 --- a/nixos/modules/hardware/video/webcam/facetimehd.nix +++ b/nixos/modules/hardware/video/webcam/facetimehd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.hardware.facetimehd; @@ -12,12 +9,12 @@ in { - options.hardware.facetimehd.enable = mkEnableOption "the facetimehd kernel module"; + options.hardware.facetimehd.enable = lib.mkEnableOption "the facetimehd kernel module"; - options.hardware.facetimehd.withCalibration = mkOption { + options.hardware.facetimehd.withCalibration = lib.mkOption { default = false; example = true; - type = types.bool; + type = lib.types.bool; description = '' Whether to include sensor calibration files for facetimehd. This makes colors look much better but is experimental, see @@ -26,7 +23,7 @@ in ''; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { boot.kernelModules = [ "facetimehd" ]; @@ -35,7 +32,7 @@ in boot.extraModulePackages = [ kernelPackages.facetimehd ]; hardware.firmware = [ pkgs.facetimehd-firmware ] - ++ optional cfg.withCalibration pkgs.facetimehd-calibration; + ++ lib.optional cfg.withCalibration pkgs.facetimehd-calibration; # unload module during suspend/hibernate as it crashes the whole system powerManagement.powerDownCommands = ''