diff options
Diffstat (limited to 'modules/athena-bccr/sys.nix')
| -rw-r--r-- | modules/athena-bccr/sys.nix | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/modules/athena-bccr/sys.nix b/modules/athena-bccr/sys.nix deleted file mode 100644 index 5457ca5..0000000 --- a/modules/athena-bccr/sys.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - pkgs, - lib, - cfg, - doctrine, - ... -}: let - athena = pkgs.${doctrine.prefix}.athena-bccr.${cfg.release}; - inherit (athena) vendor; -in { - environment = { - etc = - { - "pkcs11/modules/${vendor}".text = '' - module: ${athena.pkcs11-module} - ''; - } - // lib.optionalAttrs (vendor == "athena") { - "Athena".source = "${athena.card-driver}/etc/Athena"; - }; - - systemPackages = [athena.card-driver]; - }; - - security = { - #FIXME: Extremadamente peligroso si BCCR o MICITT caen, investigar polĂtica nacional de root CA - pki.certificateFiles = ["${athena.bccr-cacerts}/root-ca.pem"]; - - polkit = { - enable = lib.mkDefault true; - - extraConfig = '' - polkit.addRule(function(action, subject) { - if ((action.id == "org.debian.pcsc-lite.access_pcsc" || action.id == "org.debian.pcsc-lite.access_card") && - subject.isInGroup("users")) { - return polkit.Result.YES; - } - }); - ''; - }; - }; - - services = { - pcscd.enable = true; - - udev.extraRules = '' - # Athena Smartcard Solutions, Inc. ASEDrive V3CR - ATTRS{idVendor}=="0dc3", ATTRS{idProduct}=="1004", MODE="660", GROUP="${cfg.group}", TAG+="uaccess" - ''; - }; - - users.groups.${cfg.group} = {}; -} |
