2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.hardware.nitrokey;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options.hardware.nitrokey = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-04-24 23:36:52 +00:00
|
|
|
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 {
|
2021-02-05 17:12:51 +00:00
|
|
|
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|