From da7ff9a40a2508f0ccf4cb01979546125d3b3ec5 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 22 Oct 2025 18:47:21 +0200 Subject: [PATCH] modules/inventory: distributed services output reduce lexical scope --- modules/clan/module.nix | 12 +++++++----- modules/inventoryClass/default.nix | 9 ++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/clan/module.nix b/modules/clan/module.nix index 3c587d4cf..fc0300b2e 100644 --- a/modules/clan/module.nix +++ b/modules/clan/module.nix @@ -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" ]; }; diff --git a/modules/inventoryClass/default.nix b/modules/inventoryClass/default.nix index a618f95d2..356941fd8 100644 --- a/modules/inventoryClass/default.nix +++ b/modules/inventoryClass/default.nix @@ -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 = {