at 23.11-pre 543 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 7 cfg = config.hardware.nitrokey; 8 9in 10 11{ 12 options.hardware.nitrokey = { 13 enable = mkOption { 14 type = types.bool; 15 default = false; 16 description = lib.mdDoc '' 17 Enables udev rules for Nitrokey devices. By default grants access 18 to users in the "nitrokey" group. You may want to install the 19 nitrokey-app package, depending on your device and needs. 20 ''; 21 }; 22 }; 23 24 config = mkIf cfg.enable { 25 services.udev.packages = [ pkgs.libnitrokey ]; 26 }; 27}