docs: add module-docs auto-generator for NixOS and flake module options#80
Open
docs: add module-docs auto-generator for NixOS and flake module options#80
Conversation
Adds `perSystem/packages/module-docs.nix` which builds `nixosOptionsDoc`-based Markdown for all cardano-parts options: nix build .#module-docs-nixos # NixOS module options nix build .#module-docs-flake # flake module options nix build .#module-docs # both combined NixOS modules (Tier 1-3 fully documented): - profile-cardano-node-topology, module-nginx-vhost-exporter, profile-aws-ec2-ephemeral, profile-cardano-postgres, profile-mithril-relay, profile-cardano-custom-metrics, profile-tcpdump, profile-blockperf, profile-grafana-alloy, profile-cardano-node-group, role-block-producer, profile-cardano-db-sync, profile-cardano-db-sync-snapshots, profile-cardano-webserver, profile-cardano-faucet, profile-cardano-metadata, profile-cardano-smash, service-cardano-faucet Flake modules (all four namespaces documented): - flake.cardano-parts.cluster, flake.cardano-parts.pkgs, flake.cardano-parts.lib, flake.cardano-parts.aws Flake docs use a standalone lib.evalModules with only the four cardano-parts flake modules rather than the full flake-parts eval (which would trigger perSystem package evaluation without a system context, causing a "process-compose option has no value" error). All complex defaults in flakeModules get defaultText to prevent stack overflow in generators.toPretty (the self-referential groupFlake = flake default was the original trigger). Supporting changes: - flakeModules/cluster.nix: add defaultText to all complex defaults; allow null in optionCheck; fix conditional kms/bucketName defaults; fix groupMeta.domain type to nullOr str - flakeModules/pkgs.nix: add defaultText to mkPkg helper and all special function options - flakeModules/shell.nix: add defaultText to complex shell defaults - flakeModules/aws.nix: add defaultText with literalExpression to rawSpec and spec options - flake/nixosModules/profile-cardano-parts.nix: drop deprecated lib.mdDoc wrappers (plain strings are now implicit Markdown)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
perSystem/packages/module-docs.nixwhich buildsnixosOptionsDoc-based Markdown for all cardano-parts options:nix build .#module-docs-nixos # NixOS module options
nix build .#module-docs-flake # flake module options
nix build .#module-docs # both combined
NixOS modules (Tier 1-3 fully documented):
Flake modules (all four namespaces documented):
Flake docs use a standalone lib.evalModules with only the four cardano-parts flake modules rather than the full flake-parts eval (which would trigger perSystem package evaluation without a system context, causing a "process-compose option has no value" error). All complex defaults in flakeModules get defaultText to prevent stack overflow in generators.toPretty (the self-referential groupFlake = flake default was the original trigger).
Supporting changes: