summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/nitrokey.nix
blob: 9207bd2c41862eab4f2f85494f978b79c878e1ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  config,
  lib,
  pkgs,
  ...
}:
let

  cfg = config.hardware.nitrokey;

in

{
  options.hardware.nitrokey = {
    enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = ''
        Enables udev rules for Nitrokey devices.
      '';
    };
  };

  config = lib.mkIf cfg.enable {
    services.udev.packages = [ pkgs.nitrokey-udev-rules ];
  };
}