From 0e9a2388bf9e1a3258b19ebd00da0a804875ad10 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 26 May 2020 10:29:39 -0400 Subject: [PATCH] Start of an RTL-SDR module --- home/machines/chupacabra.nix | 1 + home/modules/rtlsdr.nix | 21 +++++++++++++++++++++ system/modules/common.nix | 1 + system/modules/rtlsdr.nix | 17 +++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 home/modules/rtlsdr.nix create mode 100644 system/modules/rtlsdr.nix diff --git a/home/machines/chupacabra.nix b/home/machines/chupacabra.nix index 86be9b361..69d1c604a 100644 --- a/home/machines/chupacabra.nix +++ b/home/machines/chupacabra.nix @@ -7,6 +7,7 @@ in { ../modules/common.nix ../modules/games.nix + ../modules/rtlsdr.nix ]; system.machine = { diff --git a/home/modules/rtlsdr.nix b/home/modules/rtlsdr.nix new file mode 100644 index 000000000..a1c717617 --- /dev/null +++ b/home/modules/rtlsdr.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +let + + nixpkgs-gnuradio = import (pkgs.fetchFromGitHub { + owner = "doronbehar"; + repo = "nixpkgs"; + rev = "712561aa5f10bfe6112a1726a912585612a70d1f"; + sha256 = "04yqflbwjcfl9vlplphpj82csqqz9k6m3nj1ybhwgmsc4by7vivl"; + }) {}; + +in + +{ + home.packages = with pkgs; [ + rtl-sdr + nixpkgs-gnuradio.gnuradio + nixpkgs-gnuradio.gnuradio.plugins.osmosdr + nixpkgs-gnuradio.gqrx + ]; +} diff --git a/system/modules/common.nix b/system/modules/common.nix index 230652c3d..c505d0d5d 100644 --- a/system/modules/common.nix +++ b/system/modules/common.nix @@ -7,6 +7,7 @@ ./fonts.nix ./sound.nix ./kernel.nix + ./rtlsdr.nix /home/grfn/code/urb/urbos/system ]; diff --git a/system/modules/rtlsdr.nix b/system/modules/rtlsdr.nix new file mode 100644 index 000000000..ce58ebb0d --- /dev/null +++ b/system/modules/rtlsdr.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + + environment.systemPackages = with pkgs; [ + rtl-sdr + ]; + + services.udev.packages = with pkgs; [ + rtl-sdr + ]; + + # blacklist for rtl-sdr + boot.blacklistedKernelModules = [ + "dvb_usb_rtl28xxu" + ]; +}