mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
pcscd: Convert to systemd + Fix config file
This commit is contained in:
parent
a7077973a5
commit
155dc472d8
1 changed files with 16 additions and 15 deletions
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfgFile = pkgs.writeText "reader.conf" "";
|
||||
in
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
{
|
||||
|
@ -24,21 +28,18 @@ with pkgs.lib;
|
|||
|
||||
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
|
||||
systemd.services.pcscd = {
|
||||
description = "PCSC-Lite daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
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";
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
ExecStart = "${pkgs.pcsclite}/sbin/pcscd -c ${cfgFile}";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue