1 { config, lib, pkgs, ... }:
4 cfg = config.hardware.rtl-sdr;
7 options.hardware.rtl-sdr = {
8 enable = lib.mkOption {
12 Enables rtl-sdr udev rules, ensures 'plugdev' group exists, and blacklists DVB kernel modules.
13 This is a prerequisite to using devices supported by rtl-sdr without being root, since rtl-sdr USB descriptors will be owned by plugdev through udev.
18 config = lib.mkIf cfg.enable {
19 boot.blacklistedKernelModules = [ "dvb_usb_rtl28xxu" "e4000" "rtl2832" ];
20 services.udev.packages = [ pkgs.rtl-sdr ];
21 users.groups.plugdev = {};