Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixOS: Failed to connect to the YubiKey: connecting to pscs: the Smart card resource manager is not running #137

Open
Lownin opened this issue Feb 6, 2023 · 10 comments

Comments

@Lownin
Copy link

Lownin commented Feb 6, 2023

Per the README, I've added

services.yubikey-agent.enable = true;

to my /etc/nixos/configuration.nix

I (successfully) rebuilt with sudo nixos-rebuild switch however when attempting yubikey-agent -setup I recieve the error

nixOS: Failed to connect to the YubiKey: connecting to pscs: the Smart card resource manager is not running

I've done some googling but have not seen anything relevant. Other apps work with the yubikey, like fido via firefox, and the YubiKey personalization tool.

I've successfully used the yubikey-agent to set up keys on my Mac after installing with homebrew.

Is some other set up required on nixOS that isn't documented in the README?

Thanks!

@supermarin
Copy link

Got to the bottom of it - you'll need to enable services.pcscd.enable = true; in configuration.nix.
Since this is a direct dependency, I'll submit a PR to nixpkgs to automatically include transitive dep.

@supermarin
Copy link

@Lownin can you please test? NixOS/nixpkgs#215740

@Lownin
Copy link
Author

Lownin commented Feb 10, 2023

@supermarin adding services.pcscd.enable = true; to my configuration.nix worked. I can now set up keys on nixOS. Thanks!

@supermarin
Copy link

@Lownin any chance you could test my PR? (remove the line from your configuration.nix and just use services.yubikey-agent.enable = true)?

@Lownin
Copy link
Author

Lownin commented Feb 10, 2023

@supermarin happy to help, but not sure how to make sure nixOS pulls in the PR version and not the regular one.
How do I do that?

@supermarin
Copy link

@Lownin are you using flakes? if so, you can replace inputs.nixpkgs = whatever-you-have-here with inputs.nixpkgs = github:supermarin/nixpkgs/patch-3 and nixos-rebuild switch.

@Lownin
Copy link
Author

Lownin commented Feb 10, 2023

@supermarin I haven't touched Flakes yet. Just started with nixOS. Working through learning the basics, then will tackle home-manager, then flakes. Is there an unpainful way for me to do it with a monolithic configuration.nix ?

@supermarin
Copy link

@Lownin let's take the conversation to NixOS Matrix channel and report here if the issue is resolved in the end, so we don't bloat the issue.

@Lownin
Copy link
Author

Lownin commented Feb 10, 2023

Sounds good.
@Lownin:matrix.org

@supermarin
Copy link

@FiloSottile you can close, this is resolved in NixOS/nixpkgs#215740

supermarin added a commit to supermarin/nixpkgs that referenced this issue Feb 11, 2023
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
gador pushed a commit to gador/nixpkgs that referenced this issue Feb 13, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants