From 0ec63de3e630a947e8df72b41449569f2334edc1 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 2 Apr 2025 13:38:38 +0200 Subject: [PATCH] feat(buildClan): add clan.modules as output --- lib/build-clan/interface.nix | 8 ++++++++ lib/build-clan/module.nix | 2 +- lib/build-clan/public.nix | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/build-clan/interface.nix b/lib/build-clan/interface.nix index cfcd62063..2f92275c0 100644 --- a/lib/build-clan/interface.nix +++ b/lib/build-clan/interface.nix @@ -72,6 +72,14 @@ in ''; }; + modules = lib.mkOption { + type = types.attrsOf types.raw; + default = { }; + description = '' + An attribute set of exported modules. + ''; + }; + templates = lib.mkOption { type = types.submodule { imports = [ ./templates/interface.nix ]; }; default = { }; diff --git a/lib/build-clan/module.nix b/lib/build-clan/module.nix index e55e5ff5c..dfc2c6940 100644 --- a/lib/build-clan/module.nix +++ b/lib/build-clan/module.nix @@ -208,7 +208,7 @@ in # TODO: unify this interface # We should have only clan.modules. (consistent with clan.templates) inherit (clan-core) clanModules clanLib; - modules = clan-core.clanModules; + modules = config.modules; inherit inventoryFile; inventoryValuesPrios = diff --git a/lib/build-clan/public.nix b/lib/build-clan/public.nix index 493ac1cc0..fb34480a6 100644 --- a/lib/build-clan/public.nix +++ b/lib/build-clan/public.nix @@ -8,6 +8,7 @@ # flake.clan.{name} <- clanInternals.{name} clan = [ "templates" + "modules" ]; # flake.{name} <- clan.{name} topLevel = [