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