summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/bladeRF.nix
blob: 15bd99bc0cdbb221414e376103a6004e1c50c7c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.hardware.bladeRF;

in

{
  options.hardware.bladeRF = {
    enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = ''
        Enables udev rules for BladeRF devices. By default grants access
        to users in the "bladerf" group. You may want to install the
        libbladeRF package.
      '';
    };

  };

  config = lib.mkIf cfg.enable {
    services.udev.packages = [ pkgs.libbladeRF ];
    users.groups.bladerf = { };
  };
}