nixpkgs/nixos/modules/hardware/nitrokey.nix
Robin Krahl 38ec993a58
nixos/hardware.nitrokey: replace libnitrokey with nitrokey-udev-rules
As libnitrokey is no longer developed, the udev rules have been moved to
a separate repository, nitrokey-udev-rules, that is now also available
as a package in nixpkgs.

See also: https://github.com/NixOS/nixpkgs/issues/351921
2024-10-30 09:59:51 +01:00

25 lines
541 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.hardware.nitrokey;
in
{
options.hardware.nitrokey = {
enable = lib.mkOption {
type = lib.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 = lib.mkIf cfg.enable {
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
};
}