mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
Adding the pcscd daemon (this daemon manages smartcard reader drivers), and offers
a common interface to programs dealing with smartcards (like users of the opensc lib). svn path=/nixos/trunk/; revision=19360
This commit is contained in:
parent
73bdc861b7
commit
d45a3fbdc9
|
@ -47,6 +47,7 @@
|
|||
./services/databases/postgresql.nix
|
||||
./services/hardware/acpid.nix
|
||||
./services/hardware/hal.nix
|
||||
./services/hardware/pcscd.nix
|
||||
./services/hardware/udev.nix
|
||||
./services/logging/klogd.nix
|
||||
./services/logging/syslogd.nix
|
||||
|
|
46
modules/services/hardware/pcscd.nix
Normal file
46
modules/services/hardware/pcscd.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ 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 = "daemon";
|
||||
|
||||
# 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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue