1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7let
8
9 cfg = config.hardware.nitrokey;
10
11in
12
13{
14 options.hardware.nitrokey = {
15 enable = lib.mkOption {
16 type = lib.types.bool;
17 default = false;
18 description = ''
19 Enables udev rules for Nitrokey devices.
20 '';
21 };
22 };
23
24 config = lib.mkIf cfg.enable {
25 services.udev.packages = [ pkgs.nitrokey-udev-rules ];
26 };
27}