02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
27 lines
551 B
Nix
27 lines
551 B
Nix
{ 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 {
|
|
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
|
|
};
|
|
}
|