summary refs log tree commit diff
path: root/nixos/modules/services/hardware/u2f.nix
diff options
context:
space:
mode:
authorPierre Carrier <pierre@meteor.com>2017-11-26 05:00:18 -0500
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-12-06 07:37:44 +0100
commit5a5325d11f3ed8373b6abbecbe8b4cebf91a9390 (patch)
tree9bf7a3fce5395b5a84ee1379b84f1e54369dae73 /nixos/modules/services/hardware/u2f.nix
parentfcd04a9ae5ab8885605210d9b749fe7839cfb8db (diff)
downloadnixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar.gz
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar.bz2
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar.lz
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar.xz
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.tar.zst
nixlib-5a5325d11f3ed8373b6abbecbe8b4cebf91a9390.zip
nixos/modules/services/hardware/u2f: init
Diffstat (limited to 'nixos/modules/services/hardware/u2f.nix')
-rw-r--r--nixos/modules/services/hardware/u2f.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/u2f.nix b/nixos/modules/services/hardware/u2f.nix
new file mode 100644
index 000000000000..bb4b2f05f890
--- /dev/null
+++ b/nixos/modules/services/hardware/u2f.nix
@@ -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 ];
+  };
+}
+