1 { config, lib, pkgs, ... }:
7 cfg = config.services.fprintd;
8 fprintdPkg = if cfg.tod.enable then pkgs.fprintd-tod else pkgs.fprintd;
21 enable = mkEnableOption (lib.mdDoc "fprintd daemon and PAM module for fingerprint readers handling");
26 defaultText = literalExpression "if config.services.fprintd.tod.enable then pkgs.fprintd-tod else pkgs.fprintd";
27 description = lib.mdDoc ''
28 fprintd package to use.
34 enable = mkEnableOption (lib.mdDoc "Touch OEM Drivers library support");
38 example = literalExpression "pkgs.libfprint-2-tod1-goodix";
39 description = lib.mdDoc ''
40 Touch OEM Drivers (TOD) package to use.
50 config = mkIf cfg.enable {
52 services.dbus.packages = [ cfg.package ];
54 environment.systemPackages = [ cfg.package ];
56 systemd.packages = [ cfg.package ];
58 systemd.services.fprintd.environment = mkIf cfg.tod.enable {
59 FP_TOD_DRIVERS_DIR = "${cfg.tod.driver}${cfg.tod.driver.driverPath}";