modules/inventory: distributed services output reduce lexical scope

This commit is contained in:
Johannes Kirschbauer
2025-10-22 18:47:21 +02:00
parent 410d0d0532
commit da7ff9a40a
2 changed files with 13 additions and 8 deletions

View File

@@ -231,18 +231,20 @@ in
../inventoryClass/default.nix ../inventoryClass/default.nix
{ {
inherit inventory directory flakeInputs; inherit inventory directory flakeInputs;
exportsModule = config.exportsModule;
} }
( (
let
clanConfig = config;
in
{ config, ... }: { config, ... }:
{ {
staticModules = clan-core.clan.modules; staticModules = clan-core.clan.modules;
distributedServices = clanLib.inventory.mapInstances { distributedServices = clanLib.inventory.mapInstances {
inherit (clanConfig) inventory exportsModule; inherit (config)
inherit flakeInputs directory; inventory
directory
flakeInputs
exportsModule
;
clanCoreModules = clan-core.clan.modules; clanCoreModules = clan-core.clan.modules;
prefix = [ "distributedServices" ]; prefix = [ "distributedServices" ];
}; };

View File

@@ -32,16 +32,19 @@ in
flakeInputs = mkOption { flakeInputs = mkOption {
type = types.raw; type = types.raw;
}; };
exportsModule = mkOption {
directory = mkOption { type = types.raw;
type = types.path;
}; };
distributedServices = mkOption { distributedServices = mkOption {
type = types.raw; type = types.raw;
}; };
inventory = mkOption { inventory = mkOption {
type = types.raw; type = types.raw;
}; };
directory = mkOption {
type = types.path;
};
machines = mkOption { machines = mkOption {
type = types.attrsOf (submodule ({ type = types.attrsOf (submodule ({
options = { options = {