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.
19 config = lib.mkIf cfg.enable {
20 services.udev.packages = [ pkgs.hackrf ];
21 users.groups.plugdev = { };