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;};