Skip to content

[release-25.05] doc: use stricter, more minimal module evals#1530

Merged
0xda157 merged 6 commits intorelease-25.05from
backport-1212-to-release-25.05
Jun 22, 2025
Merged

[release-25.05] doc: use stricter, more minimal module evals#1530
0xda157 merged 6 commits intorelease-25.05from
backport-1212-to-release-25.05

Conversation

@stylix-automation
Copy link
Copy Markdown
Contributor

This is an automated backport of #1212.

Previously the example evaluated `config.stylix.image`, which should not
be done by the docs.

Since `mkEnableWallpaper` already assumes `autoEnable` is static when it
evaluates `defaultText`, we can do the same for `example`.

(cherry picked from commit ab2f48f)
We don't actually need fully blown NixOS or home-manager configurations
just to read the declared `options`.

Instead, we can directly call `lib.evalModules` to build a minimal
configuration containing only stylix modules.

(cherry picked from commit bdf092d)
The docs no longer needs access to arbitrary flake inputs. We should
enforce this strictly by taking `self` instead.

(cherry picked from commit 07af242)
Providing a stub `pkgs` instance that has no contents ensures the docs
does not _read_ `pkgs` anywhere.

(cherry picked from commit e1ae98f)
With a few exceptions for `lib.stylix` functions.

Once these exceptions are removed, we will have solved the issue with
NixOS's documentation.nixos.includeAllModules option.

See #98

(cherry picked from commit 100b968)
@stylix-automation stylix-automation bot added the topic: documentation Documentation additions or improvements label Jun 22, 2025
@0xda157 0xda157 enabled auto-merge (rebase) June 22, 2025 03:27
@0xda157 0xda157 merged commit c10a257 into release-25.05 Jun 22, 2025
6 checks passed
@0xda157 0xda157 deleted the backport-1212-to-release-25.05 branch June 22, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: documentation Documentation additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants