summary refs log tree commit diff
path: root/nixos/modules/services/hardware
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-04-29 09:17:33 +0800
committerPeter Hoeg <peter@hoeg.com>2021-04-29 10:10:18 +0800
commit6d23cfd56bbecfd27f230705b709575ba9d66c26 (patch)
tree2dc3e46f4a357427c9447efa73f1437cdccad0bf /nixos/modules/services/hardware
parentce93de4f62940d9081ed441507ea10197f6f88cd (diff)
downloadnixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar.gz
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar.bz2
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar.lz
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar.xz
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.tar.zst
nixpkgs-6d23cfd56bbecfd27f230705b709575ba9d66c26.zip
nixos/pcscd: fix #121088
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r--nixos/modules/services/hardware/pcscd.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix
index 54b6693f85a..59c12ee12ca 100644
--- a/nixos/modules/services/hardware/pcscd.nix
+++ b/nixos/modules/services/hardware/pcscd.nix
@@ -57,6 +57,16 @@ in
     systemd.services.pcscd = {
       environment.PCSCLITE_HP_DROPDIR = pluginEnv;
       restartTriggers = [ "/etc/reader.conf" ];
+
+      # If the cfgFile is empty and not specified (in which case the default
+      # /etc/reader.conf is assumed), pcscd will happily start going through the
+      # entire confdir (/etc in our case) looking for a config file and try to
+      # parse everything it finds. Doesn't take a lot of imagination to see how
+      # well that works. It really shouldn't do that to begin with, but to work
+      # around it, we force the path to the cfgFile.
+      #
+      # https://github.com/NixOS/nixpkgs/issues/121088
+      serviceConfig.ExecStart = [ "" "${getBin pkgs.pcsclite}/bin/pcscd -f -x -c ${cfgFile}" ];
     };
   };
 }