aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-20 09:32:12 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-20 09:32:12 +0200
commit41e7eb0160ded3b336a7759a82dc8eba0379751b (patch)
tree701b4ebad4dae37fe2c29635a08f6776a6bc0199
parent1165f7fb0e1e926d64dd9dd14d121004061460a6 (diff)
downloadnixos-personal-41e7eb0160ded3b336a7759a82dc8eba0379751b.tar.gz
nixos-personal-41e7eb0160ded3b336a7759a82dc8eba0379751b.tar.bz2
nixos-personal-41e7eb0160ded3b336a7759a82dc8eba0379751b.zip
nixos/modules/develop: add access to some development USB devices
-rw-r--r--nixos/modules/develop.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/develop.nix b/nixos/modules/develop.nix
index 2ddd928..54401ef 100644
--- a/nixos/modules/develop.nix
+++ b/nixos/modules/develop.nix
@@ -86,6 +86,17 @@ in {
documentation.dev.enable = true;
+ services.udev.extraRules = ''
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE:="0660", GROUP="develop", SYMLINK+="stlinkv2_%n"
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="a600", ATTRS{idProduct}=="a003", MODE:="0660", GROUP="develop", SYMLINK+="aix_forte_%n"
+ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE:="0660", GROUP="develop", SYMLINK+="jlink_%n"
+ '';
+
+ users.groups.develop = { };
+ users.users.cynerd.extraGroups = [
+ "docker" "lxd" "develop"
+ ];
+
};
}