2017-05-24 22:01:07 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.hardware.nitrokey;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options.hardware.nitrokey = {
|
2024-08-24 20:05:28 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2017-05-24 22:01:07 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-24 20:05:28 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-03-25 17:13:33 +00:00
|
|
|
services.udev.packages = [ pkgs.libnitrokey ];
|
2017-05-24 22:01:07 +00:00
|
|
|
};
|
|
|
|
}
|