docs/modules: move rendering logic

This commit is contained in:
Matt Sturgeon 2026-06-24 03:03:19 +01:00
parent 79df3b165c
commit d3ba58e0bd
3 changed files with 7 additions and 9 deletions

View file

@ -98,6 +98,9 @@ let
inherit transformOptions;
}).optionsJSON;
renderDocs = pkgs.callPackage ./modules/render.nix {
inherit nixvim lib;
};
in
lib.fix (self: {
inherit options-json;
@ -110,9 +113,7 @@ lib.fix (self: {
inherit (self) lib-docs;
};
lib-docs = pkgs.callPackage ./lib {
inherit nixvim lib;
};
lib-docs = renderDocs "nixvim-lib-docs" ./lib/pages.nix;
search = mkNuschtosSearch {
optionsJSON = options-json + "/share/doc/nixos/options.json";

View file

@ -4,15 +4,12 @@
runCommand,
nixdoc,
nixvim,
pageSpecs ? ./pages.nix,
}:
name: modules:
let
menuConfiguration = lib.evalModules {
modules = [
pageSpecs
../modules
];
modules = [ ../modules ] ++ lib.toList modules;
};
cfg = menuConfiguration.config;
@ -53,7 +50,7 @@ let
};
result =
runCommand "nixvim-lib-docs"
runCommand name
{
__structuredAttrs = true;
strictDeps = true;