nixos/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
This commit is contained in:
Marin 2023-02-10 17:13:09 -05:00 committed by Marin
parent 9ee0410a57
commit 785cd824a3

View File

@ -57,6 +57,9 @@ in
];
};
# 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
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/yubikey-agent/yubikey-agent.sock"