nixpkgs/modules/services/hardware/pcscd.nix
Peter Simons eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +00:00

47 lines
752 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
services.pcscd = {
enable = mkOption {
default = false;
description = "Whether to enable the PCSC-Lite daemon.";
};
};
};
###### implementation
config = mkIf config.services.pcscd.enable {
jobs.pcscd =
{ description = "PCSC-Lite daemon";
startOn = "started udev";
daemonType = "fork";
# Add to the drivers directory the only drivers we have by now: ccid
preStart = ''
mkdir -p /var/lib/pcsc
rm -Rf /var/lib/pcsc/drivers
ln -s ${pkgs.ccid}/pcsc/drivers /var/lib/pcsc/
'';
exec = "${pkgs.pcsclite}/sbin/pcscd";
};
};
}