nixos/modules/services/hardware/u2f: init

This commit is contained in:
Pierre Carrier 2017-11-26 05:00:18 -05:00 committed by Bjørn Forsman
parent fcd04a9ae5
commit 5a5325d11f
2 changed files with 24 additions and 0 deletions

View File

@ -239,6 +239,7 @@
./services/hardware/tlp.nix
./services/hardware/thinkfan.nix
./services/hardware/trezord.nix
./services/hardware/u2f.nix
./services/hardware/udev.nix
./services/hardware/udisks2.nix
./services/hardware/upower.nix

View File

@ -0,0 +1,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 ];
};
}