nixos/vsmartcard-vcpd: init

This commit is contained in:
Christoph Honal 2024-07-09 10:10:35 +02:00
parent d676d20878
commit 94a66f9416
3 changed files with 52 additions and 0 deletions

View file

@ -127,6 +127,8 @@
- [Stash](https://github.com/stashapp/stash), An organizer for your adult videos/images, written in Go. Available as [services.stash](#opt-services.stash.enable).
- [vsmartcard-vpcd](https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html), a virtual smart card driver. Available as [services.vsmartcard-vpcd](#opt-services.vsmartcard-vpcd.enable).
- [Fider](https://fider.io/), an open platform to collect and prioritize feedback. Available as [services.fider](#opt-services.fider.enable).
- [PDS](https://github.com/bluesky-social/pds), Personal Data Server for [bsky](https://bsky.social/). Available as [services.pds](option.html#opt-services.pds).

View file

@ -567,6 +567,7 @@
./services/development/lorri.nix
./services/development/nixseparatedebuginfod.nix
./services/development/rstudio-server/default.nix
./services/development/vsmartcard-vpcd.nix
./services/development/zammad.nix
./services/display-managers/default.nix
./services/display-managers/greetd.nix

View file

@ -0,0 +1,49 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.vsmartcard-vpcd;
in
{
options.services.vsmartcard-vpcd = {
enable = lib.mkEnableOption "Virtual smart card driver.";
port = lib.mkOption {
type = lib.types.port;
default = 35963;
description = ''
Port number vpcd will be listening on.
'';
};
hostname = lib.mkOption {
type = lib.types.str;
default = "/dev/null";
description = ''
Hostname of a waiting vpicc server vpcd will be connecting to. Use /dev/null for listening mode.
'';
};
};
config = lib.mkIf cfg.enable {
services.pcscd.readerConfigs = [
''
FRIENDLYNAME "Virtual PCD"
DEVICENAME ${cfg.hostname}:0x${lib.toHexString cfg.port}
LIBPATH ${pkgs.vsmartcard-vpcd}/var/lib/pcsc/drivers/serial/libifdvpcd.so
CHANNELID 0x${lib.toHexString cfg.port}
''
];
environment.systemPackages = [ pkgs.vsmartcard-vpcd ];
};
meta.maintainers = with lib.maintainers; [ stargate01 ];
}