dotfiles/nixos/sdr.nix

28 lines
806 B
Nix
Raw Normal View History

2023-03-26 10:49:37 +01:00
{
2023-08-13 17:00:41 +01:00
config,
pkgs,
inputs,
...
}: {
home-manager.users.cyryl = {...}: {
imports = [];
home.packages = with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux";
with gnuradio3_8Packages;
[gnuradio3_8 osmosdr gqrx audacity rtl-sdr inspectrum]
++ (with pkgs; []);
2023-03-26 10:49:37 +01:00
};
2023-08-13 17:00:41 +01:00
users.extraUsers.cyryl.extraGroups = ["plugdev"];
users.groups = {"plugdev" = {};};
2023-03-26 10:49:37 +01:00
services.udev = {
2023-08-13 17:00:41 +01:00
packages = [pkgs.rtl-sdr];
2023-03-26 11:16:38 +01:00
extraRules = ''
# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
'';
2023-03-26 10:49:37 +01:00
};
# dont load DVB-T modules automatically
2023-08-13 17:00:41 +01:00
boot.blacklistedKernelModules = ["dvb_usb_rtl28xxu"];
2023-03-26 10:49:37 +01:00
}