diff --git a/externals/rules/cynthion.nix b/externals/rules/cynthion.nix new file mode 100644 index 0000000..c1321f3 --- /dev/null +++ b/externals/rules/cynthion.nix @@ -0,0 +1,7 @@ +{ writeTextFile }: + +writeTextFile { + name = "cynthion-udev-rules"; + text = builtins.readFile ./cynthion.rules; + destination = "/etc/udev/rules.d/54-cynthion.rules"; +} diff --git a/externals/rules/cynthion.rules b/externals/rules/cynthion.rules new file mode 100644 index 0000000..6da1054 --- /dev/null +++ b/externals/rules/cynthion.rules @@ -0,0 +1,16 @@ +# Configures Linux to allow access to Cynthion hardware for anyone logged into the physical terminal. +# +# # install udev rules +# sudo cp 54-cynthion.rules /etc/udev/rules.d +# +# # reload udev rules +# sudo udevadm control --reload +# +# # apply udev rules to any devices that are already plugged in +# sudo udevadm trigger + +SUBSYSTEM=="usb", ATTR{idVendor}=="1d50", ATTR{idProduct}=="615b", SYMLINK+="cynthion-%k", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="1d50", ATTR{idProduct}=="615c", SYMLINK+="cynthion-apollo-%k", TAG+="uaccess" + +SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="000a", SYMLINK+="cynthion-test-%k", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="000e", SYMLINK+="cynthion-example-%k", TAG+="uaccess" diff --git a/sets/hardware.nix b/sets/hardware.nix index 8fd3465..b25b411 100644 --- a/sets/hardware.nix +++ b/sets/hardware.nix @@ -2,6 +2,7 @@ { services.udev.packages = with pkgs; [ (callPackage ../externals/rules/adafruit.nix { }) + (callPackage ../externals/rules/cynthion.nix { }) (callPackage ../externals/rules/limesuite.nix { }) glasgow libsigrok @@ -10,6 +11,7 @@ ]; environment.systemPackages = with pkgs; [ + cynthion glasgow jlink kicad