From 59105bd1dab1a03bc54d19ad2b65edc43e6fd7a8 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Thu, 24 Jul 2025 09:41:34 +0200 Subject: [PATCH] =?UTF-8?q?docs/options:=20expose=20all=20clan=20options?= =?UTF-8?q?=20in=20N=C3=BCschtOS=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/nix/options/flake-module.nix | 44 ++++++++++++++++++++----------- lib/modules/clan/interface.nix | 4 +-- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/nix/options/flake-module.nix b/docs/nix/options/flake-module.nix index 32fcf8eae..80b8bb653 100644 --- a/docs/nix/options/flake-module.nix +++ b/docs/nix/options/flake-module.nix @@ -114,9 +114,6 @@ in { options = { - _ = mkOption { - type = types.raw; - }; instances.${name} = lib.mkOption { inherit description; type = types.submodule { @@ -149,20 +146,29 @@ }; }; - mkScope = name: modules: { - inherit name; - modules = [ - { - _module.args = { inherit clanLib; }; - _file = "docs mkScope"; - } - { noInstanceOptions = true; } - ../../../lib/modules/inventoryClass/interface.nix - ] ++ mapAttrsToList fakeInstanceOptions modules; - urlPrefix = "https://github.com/nix-community/dream2nix/blob/main/"; - }; + docModules = [ + { + inherit self; + } + self.modules.clan.default + { + options.inventory = lib.mkOption { + type = types.submoduleWith { + modules = [ + { noInstanceOptions = true; } + ] ++ mapAttrsToList fakeInstanceOptions serviceModules; + }; + }; + } + ]; + in { + # Uncomment for debugging + # legacyPackages.docModules = lib.evalModules { + # modules = docModules; + # }; + packages = lib.optionalAttrs ((privateInputs ? nuschtos) || (inputs ? nuschtos)) { docs-options = (privateInputs.nuschtos or inputs.nuschtos) @@ -171,7 +177,13 @@ inherit baseHref; title = "Clan Options"; # scopes = mapAttrsToList mkScope serviceModules; - scopes = [ (mkScope "Clan Inventory" serviceModules) ]; + scopes = [ + { + name = "Clan"; + modules = docModules; + urlPrefix = "https://git.clan.lol/clan/clan-core/src/branch/main/"; + } + ]; }; }; }; diff --git a/lib/modules/clan/interface.nix b/lib/modules/clan/interface.nix index a9d52066e..a097f7344 100644 --- a/lib/modules/clan/interface.nix +++ b/lib/modules/clan/interface.nix @@ -229,8 +229,8 @@ in }; inventory = lib.mkOption { - type = types.submodule { - imports = [ + type = types.submoduleWith { + modules = [ { _module.args = { inherit clanLib; }; _file = "clan interface";