summaryrefslogtreecommitdiff
path: root/config/yubikey.nix
blob: 3029d90a0d4b3adee6083057091ea6b13ccab4e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ config, lib, pkgs, ... }:
let
  yubikey-pkgs = with pkgs; [
    ccid
    libu2f-host
    libusb
    rng_tools
    yubikey-manager
    yubikey-personalization
    gnupg
    pinentry
  ];
in
{
  services.pcscd.enable = true;
  services.udev.packages = with pkgs; [
    libu2f-host
    yubikey-personalization
  ];

  programs.gnupg.agent = {
    enable = true;
    enableSSHSupport = true;
  };
  # Use GPG agent instead.
  programs.ssh.startAgent = lib.mkDefault false;

  environment = {
    systemPackages = yubikey-pkgs;
  };
}