about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-10-15 17:19:48 +0900
committersefidel <contact@sefidel.net>2023-10-15 21:01:20 +0900
commitf737eecdade66600fcd75fbabcef28660eccf09c (patch)
tree38613885971b533c03469a22d4afb4d1cc346b84
parent8bb2efd15eeaa35ab6f73284579180284dcfc01f (diff)
downloadnixrc-f737eecdade66600fcd75fbabcef28660eccf09c.tar.gz
nixrc-f737eecdade66600fcd75fbabcef28660eccf09c.zip
feat(modules/devkit): init
-rw-r--r--modules/devkit.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/devkit.nix b/modules/devkit.nix
new file mode 100644
index 0000000..65d8de0
--- /dev/null
+++ b/modules/devkit.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, unstable, unstable-small, nixpkgs-2211, lib, ... }:
+
+{
+  options.hardware.devkit.enable = lib.mkEnableOption "udev rules for development boards";
+
+  config = lib.mkIf config.hardware.devkit.enable {
+    # Ensure 'plugdev' group exists
+    users.groups.plugdev = { };
+
+    environment.systemPackages = [
+      pkgs.openocd
+    ];
+
+    services.udev.packages = [
+      # light dependency from probe-rs
+      pkgs.openocd
+    ];
+  };
+}