1 { config, lib, pkgs, ... }:
4 cfg = config.hardware.hackrf;
8 options.hardware.hackrf = {
9 enable = lib.mkOption {
10 type = lib.types.bool;
13 Enables hackrf udev rules and ensures 'plugdev' group exists.
14 This is a prerequisite to using HackRF devices without being root, since HackRF USB descriptors will be owned by plugdev through udev.
15 Ensure your user is a member of the 'plugdev' group after enabling.
20 config = lib.mkIf cfg.enable {
21 services.udev.packages = [ pkgs.hackrf ];
22 users.groups.plugdev = { };