···6666 default = [ ];
6767 description = "Extra command line arguments to be passed to the PCSC daemon.";
6868 };
6969+7070+ ignoreReaderNames = lib.mkOption {
7171+ type = lib.types.listOf (lib.types.strMatching "[^:]+");
7272+ default = [ ];
7373+ description = ''
7474+ List of reader name patterns for the PCSC daemon to ignore.
7575+7676+ For more precise control, readers can be ignored through udev rules
7777+ (cf. {option}`services.udev.extraRules`) by setting the
7878+ `PCSCLITE_IGNORE` property, for example:
7979+8080+ ```
8181+ ACTION!="remove|unbind", SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ENV{PCSCLITE_IGNORE}="1"
8282+ ```
8383+ '';
8484+ example = [
8585+ "Nitrokey"
8686+ "YubiKey"
8787+ ];
8888+ };
8989+9090+ extendReaderNames = lib.mkOption {
9191+ type = lib.types.nullOr lib.types.str;
9292+ default = null;
9393+ description = ''
9494+ String to append to every reader name. The special variable `$HOSTNAME`
9595+ will be expanded to the current host name.
9696+ '';
9797+ example = " $HOSTNAME";
9898+ };
6999 };
7010071101 config = lib.mkIf config.services.pcscd.enable {
···79109 systemd.sockets.pcscd.wantedBy = [ "sockets.target" ];
8011081111 systemd.services.pcscd = {
8282- environment.PCSCLITE_HP_DROPDIR = pluginEnv;
112112+ environment = {
113113+ PCSCLITE_HP_DROPDIR = pluginEnv;
114114+115115+ PCSCLITE_FILTER_IGNORE_READER_NAMES = lib.mkIf (cfg.ignoreReaderNames) (
116116+ lib.concatStringsSep ":" cfg.ignoreReaderNames
117117+ );
118118+119119+ PCSCLITE_FILTER_EXTEND_READER_NAMES = lib.mkIf (
120120+ cfg.extendReaderNames != null
121121+ ) cfg.extendReaderNames;
122122+ };
8312384124 # If the cfgFile is empty and not specified (in which case the default
85125 # /etc/reader.conf is assumed), pcscd will happily start going through the