From 4d9366e1980b4c6e0ccbdca793b5ed08e481ad05 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 29 Dec 2024 21:50:36 +0100 Subject: [PATCH] nixos/services.fprintd: remove `with lib;` --- nixos/modules/services/security/fprintd.nix | 23 +++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/modules/services/security/fprintd.nix b/nixos/modules/services/security/fprintd.nix index 87c3f1f6f9e4..ea6d6189d248 100644 --- a/nixos/modules/services/security/fprintd.nix +++ b/nixos/modules/services/security/fprintd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.fprintd; @@ -18,12 +15,12 @@ in services.fprintd = { - enable = mkEnableOption "fprintd daemon and PAM module for fingerprint readers handling"; + enable = lib.mkEnableOption "fprintd daemon and PAM module for fingerprint readers handling"; - package = mkOption { - type = types.package; + package = lib.mkOption { + type = lib.types.package; default = fprintdPkg; - defaultText = literalExpression "if config.services.fprintd.tod.enable then pkgs.fprintd-tod else pkgs.fprintd"; + defaultText = lib.literalExpression "if config.services.fprintd.tod.enable then pkgs.fprintd-tod else pkgs.fprintd"; description = '' fprintd package to use. ''; @@ -31,11 +28,11 @@ in tod = { - enable = mkEnableOption "Touch OEM Drivers library support"; + enable = lib.mkEnableOption "Touch OEM Drivers library support"; - driver = mkOption { - type = types.package; - example = literalExpression "pkgs.libfprint-2-tod1-goodix"; + driver = lib.mkOption { + type = lib.types.package; + example = lib.literalExpression "pkgs.libfprint-2-tod1-goodix"; description = '' Touch OEM Drivers (TOD) package to use. ''; @@ -47,7 +44,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.dbus.packages = [ cfg.package ]; @@ -55,7 +52,7 @@ in systemd.packages = [ cfg.package ]; - systemd.services.fprintd.environment = mkIf cfg.tod.enable { + systemd.services.fprintd.environment = lib.mkIf cfg.tod.enable { FP_TOD_DRIVERS_DIR = "${cfg.tod.driver}${cfg.tod.driver.driverPath}"; };