nixos/pcscd: fix #121088

This commit is contained in:
Peter Hoeg 2021-04-29 09:17:33 +08:00
parent ce93de4f62
commit 6d23cfd56b

View File

@ -57,6 +57,16 @@ in
systemd.services.pcscd = { systemd.services.pcscd = {
environment.PCSCLITE_HP_DROPDIR = pluginEnv; environment.PCSCLITE_HP_DROPDIR = pluginEnv;
restartTriggers = [ "/etc/reader.conf" ]; 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}" ];
}; };
}; };
} }