1{ config, lib, pkgs, ... }: 2 3with lib; 4let 5 cfg = config.hardware.u2f; 6in { 7 options = { 8 hardware.u2f = { 9 enable = mkOption { 10 type = types.bool; 11 default = false; 12 description = '' 13 Enable U2F hardware support. 14 ''; 15 }; 16 }; 17 }; 18 19 config = mkIf cfg.enable { 20 services.udev.packages = [ pkgs.libu2f-host ]; 21 }; 22} 23