From df51d2ffc82632a893db6655b5faea743e5d173b Mon Sep 17 00:00:00 2001 From: Reed Krantz Date: Tue, 28 Apr 2026 17:11:37 -0500 Subject: [PATCH] fix: fix the flake producing errors on check and when trying to access the templates output --- flake.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d32b04f..8c87d60 100644 --- a/flake.nix +++ b/flake.nix @@ -20,15 +20,35 @@ }; }; - outputs = {flake-parts, ...} @ inputs: + outputs = { + self, + flake-parts, + ... + } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { imports = [ - flake-parts.flakeModules.flakeModules - ./cad ./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"]; perSystem = {pkgs, ...}: {formatter = pkgs.alejandra;};