about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/hardware/u2f.nix
blob: bb4b2f05f890cb361ec3acbb87c386ae27bc9a71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.hardware.u2f;
in {
  options = {
    hardware.u2f = {
      enable = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Enable U2F hardware support.
        '';
      };
    };
  };

  config = mkIf cfg.enable {
    services.udev.packages = [ pkgs.libu2f-host ];
  };
}