docs: remove spam from flake-outputs

...instead use internal options to pass the module docs pages to the renderer
This commit is contained in:
DavHau 2023-12-10 13:00:05 +07:00 committed by mergify[bot]
parent 3f6c7cbd80
commit 95fa909f84
2 changed files with 8 additions and 3 deletions

View File

@ -355,9 +355,14 @@ in {
type = types.attrsOf (types.submodule inputModule);
};
};
generated-docs = mkOption {
type = types.raw;
description = "Generated documentation.";
readOnly = true;
};
};
config = {
packages =
generated-docs =
lib.mapAttrs' (name: inputCfg: {
name = "generated-docs-${name}";
value = inputCfg.rendered;

View File

@ -84,7 +84,7 @@
case "$ln" in
"# Modules Reference")
echo "# Modules Reference"
cat ${self'.packages.generated-summary-md}
cat ${config.generated-docs.generated-summary-md}
;;
*)
echo "$ln"
@ -97,7 +97,7 @@
cp ${../../dream2nix/core/docs/theme/favicon.png} ./theme/favicon.png
mkdir -p src/options
for f in ${config.packages.generated-docs}/*.html; do
for f in ${config.generated-docs.generated-docs}/*.html; do
cp "$f" "src/options/$(basename "$f" .html).md"
done
mdbook build --dest-dir $TMPDIR/out