feat(lib/inventory): use clanLib instead of clan-core as internal specialArg. This has the benefit of beeing more narrow scoped.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
clan-core,
|
||||
clanLib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -43,8 +43,7 @@ let
|
||||
|
||||
checkService =
|
||||
modulepath: serviceName:
|
||||
builtins.elem "inventory"
|
||||
(clan-core.lib.modules.getFrontmatter modulepath serviceName).features or [ ];
|
||||
builtins.elem "inventory" (clanLib.modules.getFrontmatter modulepath serviceName).features or [ ];
|
||||
|
||||
compileMachine =
|
||||
{ machineConfig }:
|
||||
@@ -160,7 +159,7 @@ in
|
||||
inherit
|
||||
resolveTags
|
||||
inventory
|
||||
clan-core
|
||||
clanLib
|
||||
machineName
|
||||
serviceConfigs
|
||||
;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
config,
|
||||
resolveTags,
|
||||
inventory,
|
||||
clan-core,
|
||||
clanLib,
|
||||
machineName,
|
||||
serviceConfigs,
|
||||
...
|
||||
@@ -14,7 +14,7 @@ in
|
||||
{
|
||||
# Roles resolution
|
||||
# : List String
|
||||
supportedRoles = clan-core.lib.modules.getRoles inventory.modules serviceName;
|
||||
supportedRoles = clanLib.modules.getRoles inventory.modules serviceName;
|
||||
matchedRoles = builtins.attrNames (
|
||||
lib.filterAttrs (_: ms: builtins.elem machineName ms) config.machinesRoles
|
||||
);
|
||||
@@ -56,7 +56,7 @@ in
|
||||
|
||||
assertions = lib.concatMapAttrs (
|
||||
instanceName: resolvedRoles:
|
||||
clan-core.lib.modules.checkConstraints {
|
||||
clanLib.modules.checkConstraints {
|
||||
moduleName = serviceName;
|
||||
allModules = inventory.modules;
|
||||
inherit resolvedRoles instanceName;
|
||||
|
||||
Reference in New Issue
Block a user