From f133a894d89bbedfc17e56189d3ef77005b6b877 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 18 Feb 2026 18:56:39 -0600 Subject: [PATCH] trivionomicon: athena-bccr: fix Polkit authentication failures --- modules/athena-bccr/sys.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/athena-bccr/sys.nix b/modules/athena-bccr/sys.nix index 631185d..9532358 100644 --- a/modules/athena-bccr/sys.nix +++ b/modules/athena-bccr/sys.nix @@ -19,8 +19,22 @@ in { systemPackages = [athena.ase-pkcs11]; }; - #FIXME: Extremadamente peligroso si BCCR o MICITT caen, investigar política nacional de root CA - security.pki.certificateFiles = ["${athena.bccr-cacerts}/root-ca.pem"]; + 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" && subject.isInGroup("users")) { + return polkit.Result.YES; + } + }); + ''; + }; + }; services = { pcscd.enable = true;