feat(lib/modules): remove dependency on self
This commit is contained in:
@@ -28,11 +28,9 @@ lib.fix (clanLib: {
|
|||||||
inherit lib;
|
inherit lib;
|
||||||
clan-core = self;
|
clan-core = self;
|
||||||
};
|
};
|
||||||
modules = import ./frontmatter {
|
|
||||||
inherit lib self;
|
|
||||||
};
|
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
# Lib functions that don't depend on 'self'
|
# Lib functions that don't depend on 'self'
|
||||||
|
modules = clanLib.callLib ./frontmatter { };
|
||||||
facts = import ./facts.nix { inherit lib; };
|
facts = import ./facts.nix { inherit lib; };
|
||||||
values = import ./values { inherit lib; };
|
values = import ./values { inherit lib; };
|
||||||
jsonschema = import ./jsonschema { inherit lib; };
|
jsonschema = import ./jsonschema { inherit lib; };
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{ lib, self }:
|
{ lib, clanLib }:
|
||||||
let
|
let
|
||||||
# Trim the .nix extension from a filename
|
# Trim the .nix extension from a filename
|
||||||
trimExtension = name: builtins.substring 0 (builtins.stringLength name - 4) name;
|
trimExtension = name: builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||||
|
|
||||||
jsonWithoutHeader = self.lib.jsonschema {
|
jsonWithoutHeader = clanLib.jsonschema {
|
||||||
includeDefaults = true;
|
includeDefaults = true;
|
||||||
header = { };
|
header = { };
|
||||||
};
|
};
|
||||||
@@ -13,7 +13,7 @@ let
|
|||||||
lib.mapAttrs (
|
lib.mapAttrs (
|
||||||
_moduleName: rolesOptions:
|
_moduleName: rolesOptions:
|
||||||
lib.mapAttrs (_roleName: options: jsonWithoutHeader.parseOptions options { }) rolesOptions
|
lib.mapAttrs (_roleName: options: jsonWithoutHeader.parseOptions options { }) rolesOptions
|
||||||
) (self.lib.evalClanModulesWithRoles modules);
|
) (clanLib.evalClanModulesWithRoles modules);
|
||||||
|
|
||||||
evalFrontmatter =
|
evalFrontmatter =
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user