fix: fix the flake producing errors on check and when trying to access the templates output

This commit is contained in:
2026-04-28 17:11:37 -05:00
parent 5683d7e84c
commit df51d2ffc8
+23 -3
View File
@@ -20,15 +20,35 @@
}; };
}; };
outputs = {flake-parts, ...} @ inputs: outputs = {
self,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
imports = [ imports = [
flake-parts.flakeModules.flakeModules
./cad ./cad
./rust ./rust
flake-parts.flakeModules.flakeModules
# define the flake.templates option
({lib, ...}: {
options.flake.templates = lib.mkOption {
type = lib.types.lazyAttrsOf (lib.types.submodule {
options = {
path = lib.mkOption {type = lib.types.path;};
description = lib.mkOption {type = lib.types.str;};
};
});
default = {};
};
})
]; ];
flake.flakeModule = {
imports = builtins.attrValues (builtins.removeAttrs self.flakeModules ["default"]);
};
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"]; systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {pkgs, ...}: {formatter = pkgs.alejandra;}; perSystem = {pkgs, ...}: {formatter = pkgs.alejandra;};