use cynthion from nixpkgs

This commit is contained in:
Artemis Tosini 2024-12-06 19:38:50 +00:00
parent e84ae57f66
commit 91bcf2b4f1
Signed by: artemist
GPG key ID: EE5227935FE3FF18
3 changed files with 25 additions and 0 deletions

7
externals/rules/cynthion.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ writeTextFile }:
writeTextFile {
name = "cynthion-udev-rules";
text = builtins.readFile ./cynthion.rules;
destination = "/etc/udev/rules.d/54-cynthion.rules";
}

16
externals/rules/cynthion.rules vendored Normal file
View file

@ -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"

View file

@ -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