summary refs log blame commit diff
path: root/nixos/modules/hardware/nitrokey.nix
blob: baa07203118c6a6a9c84b96c1c60047af88da3a1 (plain) (tree)




















                                                                         


                            
                                                          

    
{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.hardware.nitrokey;

in

{
  options.hardware.nitrokey = {
    enable = mkOption {
      type = types.bool;
      default = false;
      description = ''
        Enables udev rules for Nitrokey devices. By default grants access
        to users in the "nitrokey" group. You may want to install the
        nitrokey-app package, depending on your device and needs.
      '';
    };
  };

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