From 29b00b664937a68e5c221bcbbd1bf34e3dbac809 Mon Sep 17 00:00:00 2001 From: Marin Date: Fri, 10 Feb 2023 17:13:09 -0500 Subject: [PATCH] [yubikey-agent] Add dependency to pcsd.service Issue: after installing, running `yubikey-agent -setup` produces the following error: `nixOS: Failed to connect to the YubiKey: connecting to pscs: the Smart card resource manager is not running` More on this issue: https://github.com/FiloSottile/yubikey-agent/issues/137 Not sure if this is the best way to add a dependency to a service tho - open for input. --- nixos/modules/services/security/yubikey-agent.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/security/yubikey-agent.nix b/nixos/modules/services/security/yubikey-agent.nix index c91ff3e69a0a4df..b11f50a07eb48b8 100644 --- a/nixos/modules/services/security/yubikey-agent.nix +++ b/nixos/modules/services/security/yubikey-agent.nix @@ -56,6 +56,9 @@ in "graphical-session.target") ]; }; + + # Yubikey-agent expects pcsd to be running in order to function. + services.pcscd.enable = true; environment.extraInit = '' if [ -z "$SSH_AUTH_SOCK" -a -n "$XDG_RUNTIME_DIR" ]; then