clanServices: remove unneeded self reference in lib

This commit is contained in:
Johannes Kirschbauer
2025-06-30 15:32:31 +02:00
parent 0de362af58
commit cf6fc744ab
6 changed files with 14 additions and 11 deletions

View File

@@ -1,12 +1,9 @@
{
lib,
clanLib,
clan-core,
clanLib
}:
let
services = clanLib.callLib ./distributed-service/inventory-adapter.nix {
inherit clan-core;
};
services = clanLib.callLib ./distributed-service/inventory-adapter.nix { };
in
{
inherit (services) mapInstances;

View File

@@ -12,11 +12,10 @@
{
lib,
clanLib,
clan-core,
...
}:
let
resolveModule = import ./resolveModule.nix { inherit lib clan-core; };
resolveModule = import ./resolveModule.nix { inherit lib; };
in
{
mapInstances =
@@ -26,6 +25,7 @@ in
# The clan inventory
inventory,
localModuleSet,
clanCoreModules,
prefix ? [ ],
}:
let
@@ -38,7 +38,7 @@ in
resolvedModule = resolveModule {
moduleSpec = instance.module;
inherit localModuleSet;
inherit flakeInputs;
inherit flakeInputs clanCoreModules;
};
# Every instance includes machines via roles

View File

@@ -1,8 +1,9 @@
{ lib, clan-core }:
{ lib }:
{
moduleSpec,
flakeInputs,
localModuleSet,
clanCoreModules,
}:
let
inputName = if moduleSpec.input == null then "<clan>" else moduleSpec.input;
@@ -29,7 +30,7 @@ let
let
input =
if moduleSpec.input == null then
clan-core
{ clan.modules = clanCoreModules; }
else if moduleSpec.input == "self" then
{ clan.modules = localModuleSet; }
else

View File

@@ -45,6 +45,7 @@ let
inventory = evalInventory inventoryModule;
in
clanLib.inventory.mapInstances {
clanCoreModules = { };
flakeInputs = flakeInputsFixture;
inherit inventory;
localModuleSet = inventory.modules;