feat(rust-esp32-c6): make the rust-esp32-c6 template

This commit is contained in:
2026-06-04 20:20:48 -05:00
parent d00885ced7
commit 25609ea025
13 changed files with 337 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
{
flake-parts-lib,
inputs,
self,
...
}: {
flake = {
templates = {
rust-esp32-c6 = {
path = ./template;
description = "ESP32-C6 RISC-V rust project with a blink led example";
};
};
flakeModules.rust-esp32-c6 = {
imports = [
inputs.treefmt-nix.flakeModule
self.outputs.flakeModules.rust
];
options.perSystem = flake-parts-lib.mkPerSystemOption ({
lib,
config,
pkgs,
self',
...
}: let
cfg = config.krantz.rust.esp32-c6;
craneLib = config.krantz.rust.craneLib;
in {
options.krantz.rust.esp32-c6 = {
enable = lib.mkEnableOption "additional tooling for the esp32 RISC-V";
};
config = lib.mkIf cfg.enable {
krantz.rust.devDeps = lib.mkOptionDefault (with pkgs; [
espflash
]);
};
});
};
};
}