Skip to content

Commit

Permalink
nixos/yubikey-agent: Add dependency to pcsd.service
Browse files Browse the repository at this point in the history
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: FiloSottile/yubikey-agent#137
  • Loading branch information
supermarin committed Feb 11, 2023
1 parent 9ee0410 commit 785cd82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixos/modules/services/security/yubikey-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 785cd82

Please sign in to comment.