docs/modules: move rendering logic
This commit is contained in:
parent
79df3b165c
commit
d3ba58e0bd
3 changed files with 7 additions and 9 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue