diff --git a/modules/flake-parts/render/default.nix b/modules/flake-parts/render/default.nix index 8eb5e948..60014eef 100644 --- a/modules/flake-parts/render/default.nix +++ b/modules/flake-parts/render/default.nix @@ -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; diff --git a/modules/flake-parts/site/default.nix b/modules/flake-parts/site/default.nix index de655077..1629eda1 100644 --- a/modules/flake-parts/site/default.nix +++ b/modules/flake-parts/site/default.nix @@ -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