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
{
inherit inventory directory flakeInputs;
exportsModule = config.exportsModule;
}
(
let
clanConfig = config;
in
{ config, ... }:
{
staticModules = clan-core.clan.modules;
distributedServices = clanLib.inventory.mapInstances {
inherit (clanConfig) inventory exportsModule;
inherit flakeInputs directory;
inherit (config)
inventory
directory
flakeInputs
exportsModule
;
clanCoreModules = clan-core.clan.modules;
prefix = [ "distributedServices" ];
};

View File

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