ctucx.git: nixfiles

ctucx' nixfiles

commit ee77ac62ea639b9d7e9ecb0b9243619657c625e1
parent 9f9ce840ce75eb4e297eb63aabce332a777e1247
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 12 Jan 2022 18:06:27 +0100

configurations/sdr: add udev-rules for rtlsdr,hackrf and some useful programs
1 file changed, 26 insertions(+), 0 deletions(-)
A
configurations/sdr.nix
|
26
++++++++++++++++++++++++++
diff --git a/configurations/sdr.nix b/configurations/sdr.nix
@@ -0,0 +1,26 @@
+{ config, pkgs, ... }:
+
+{
+  hardware.rtl-sdr.enable      = true;
+
+  users.users.leah.extraGroups = [ "plugdev" ];
+
+  users.groups.plugdev         = {};
+  services.udev.extraRules = ''
+    ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev"
+    ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev"
+    ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="plugdev"
+    ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="plugdev"
+  '';
+
+  home-manager.users.leah = {
+    home.packages = with pkgs; [
+      hackrf
+      gqrx
+      welle-io
+      multimon-ng
+      dsd
+      dump1090
+    ];
+  };
+}