test(options-doc): test doc generation for module - #975
Merged
Conversation
Contributor
Author
|
Test successfully failed. 👍 |
SuperSandro2000
force-pushed
the
feat/docs-modules
branch
from
February 9, 2026 13:55
6dc01b6 to
16d23d9
Compare
SuperSandro2000
approved these changes
Feb 9, 2026
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.
Summary
Add a regression test to the CI suite that validates the evaluation of all NixOS module options.
Problem
A recent bug demonstrated that using
configvalues inside an option'stypedefinition (e.g.,lib.attrNames config.users.users) causes documentation generation to fail with "missing attribute" or "infinite recursion" errors. These errors are often only discovered late in the development cycle or when building the project's documentation.Solution
This PR introduces a new flake check,
options-doc, which:documentation.nixos.includeAllModules = true.options.jsonderivation.By enabling
includeAllModules, Nix is forced to deeply evaluate thetypeanddescriptionfields of every option in every module. If an option type contains a circular reference or relies on aconfigvalue that isn't available during doc-gen, this check will fail in CI.Changes
checks/options-doc.nix: Logic to evaluate the system manual's options.flake.nix: Integrated the new check into thechecksattribute set.Verification
You can run this check locally with:
nix build .#checks.<system>.options-docDetails
Output: