fix(getModulesSchema): forward argument to evalClanModules

This commit is contained in:
Johannes Kirschbauer
2025-04-08 15:55:03 +02:00
parent e6312601a5
commit be8b86153c
2 changed files with 21 additions and 6 deletions

View File

@@ -9,11 +9,22 @@ let
};
getModulesSchema =
modules:
lib.mapAttrs (
{
modules,
clan-core,
pkgs,
}:
lib.mapAttrs
(
_moduleName: rolesOptions:
lib.mapAttrs (_roleName: options: jsonWithoutHeader.parseOptions options { }) rolesOptions
) (clanLib.evalClan.evalClanModulesWithRoles modules);
)
(
clanLib.evalClan.evalClanModulesWithRoles {
allModules = modules;
inherit pkgs clan-core;
}
);
evalFrontmatter =
{

View File

@@ -6,7 +6,11 @@
}:
let
modulesSchema = self.lib.modules.getModulesSchema self.clanModules;
modulesSchema = self.lib.modules.getModulesSchema {
modules = self.clanModules;
inherit pkgs;
clan-core = self;
};
jsonLib = self.lib.jsonschema { inherit includeDefaults; };
includeDefaults = true;