diff --git a/docs/default.nix b/docs/default.nix index 5070b4b1..73d3f70d 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -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"; diff --git a/docs/lib/function-locations.nix b/docs/modules/function-locations.nix similarity index 100% rename from docs/lib/function-locations.nix rename to docs/modules/function-locations.nix diff --git a/docs/lib/default.nix b/docs/modules/render.nix similarity index 95% rename from docs/lib/default.nix rename to docs/modules/render.nix index dc4043ea..b22241ba 100644 --- a/docs/lib/default.nix +++ b/docs/modules/render.nix @@ -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;