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/modules/services/hardware/u2f: init #32069

Closed
wants to merge 1 commit into from
Closed

nixos/modules/services/hardware/u2f: init #32069

wants to merge 1 commit into from

Conversation

pcarrier
Copy link
Contributor

@pcarrier pcarrier commented Nov 26, 2017

Motivation for this change

Yubikeys requires special hidraw device permissions to be usable in eg Chrome.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@pcarrier pcarrier changed the title nixos/modules/services/hardware/yubikey: init nixos/modules/services/hardware/u2f: init Nov 26, 2017
mkdir -p $out/etc/udev/rules.d
ln -s ${pkgs.libu2f-host}/lib/udev/rules.d/70-u2f.rules $out/etc/udev/rules.d/70-u2f.rules
'';
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not services.udev.packages = [ pkgs.libu2f-host ];? To save disk space?

cfg = config.services.u2f;
in {
options = {
services.u2f = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "hardware.u2f" namespace is better than "services.u2f".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea thanks

@pcarrier
Copy link
Contributor Author

Thanks @bjornfor, tested again and everything seems to work after unplugging and replugging the device.

@chris-martin
Copy link
Contributor

Thank you! I've been wondering how to get my yubikey working for ages. I didn't know about services.udev.packages. Having this option will be great to improve discoverability.

chris-martin added a commit to chris-martin/home that referenced this pull request Dec 6, 2017
@bjornfor
Copy link
Contributor

bjornfor commented Dec 6, 2017

Applied to master (5a5325d). Thanks!

@bjornfor bjornfor closed this Dec 6, 2017
@pcarrier pcarrier deleted the pcarrier/yubikey branch December 6, 2017 08:52
chris-martin added a commit to chris-martin/home that referenced this pull request Mar 25, 2023
chris-martin added a commit to chris-martin/home that referenced this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants