mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 05:29:20 +03:00
nixos/vsmartcard-vcpd: init
This commit is contained in:
parent
d676d20878
commit
94a66f9416
3 changed files with 52 additions and 0 deletions
|
@ -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).
|
||||
|
|
|
@ -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
|
||||
|
|
49
nixos/modules/services/development/vsmartcard-vpcd.nix
Normal file
49
nixos/modules/services/development/vsmartcard-vpcd.nix
Normal 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 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue