fix(getModulesSchema): forward argument to evalClanModules

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

View File

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

View File

@@ -6,7 +6,11 @@
}: }:
let 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; }; jsonLib = self.lib.jsonschema { inherit includeDefaults; };
includeDefaults = true; includeDefaults = true;