mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge remote-tracking branch 'origin/master' into staging-next
This commit is contained in:
commit
395cc7772d
30 changed files with 358 additions and 168 deletions
|
@ -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 ];
|
||||
}
|
|
@ -92,7 +92,7 @@ let
|
|||
chmod 0755 "$root/etc" "$root/var/lib"
|
||||
mkdir -p "$root/var/lib/private" "$root/root" /run/nixos-containers
|
||||
chmod 0700 "$root/var/lib/private" "$root/root" /run/nixos-containers
|
||||
if ! [ -e "$root/etc/os-release" ]; then
|
||||
if ! [ -e "$root/etc/os-release" ] && ! [ -h "$root/etc/os-release" ]; then
|
||||
touch "$root/etc/os-release"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue