doc: remove redundant documentation dummy values
The following long-standing unresolved question finally seems be resolved:
Can
docs/settings.nixbe removed due to the newstylix.enableoption?Not yet: although the option is not required any more, the default value for
stylix.imageis still of an incorrect type, so it needs to be overridden. This will be fixed in #407, after which it should be possible to remove the file.-- https://github.com/nix-community/stylix/pull/244#issuecomment-2156998617
The removal of /doc/settings.nix resolves the following subtle regression:
This is a very subtle regression making dummy
stylixvalues mandatory insidepkgs.nixosOptionsDoc. Although Stylix works around this limitation with/docs/settings.nix, I am unsure how I was able to usepkgs.nixosOptionsDocwithoutstylixdummy values in my Home Manager setup until now. However, since/docs/settings.nixmay be removed in the future, this regression should be fine and can be ignored in this PR:Due to some targets not being enabled by default with
stylix.mkEnableTarget, the documentation incorrectly generatesDefault: falsein some cases with https://github.com/danth/stylix/pull/399. Resolving this involves manually extendingdocs/settings.nixor enabling all targets by default withstylix.mkEnableTarget.-- https://github.com/danth/stylix/issues/400#issue-2319041678
For reference, I resolved this regression on my end by adding the
"${inputs.stylix}/docs/settings.nixmodule to mypkgs.nixosOptionsDocenvironment.-- https://github.com/nix-community/stylix/pull/717#pullrequestreview-2619444260
Entirely removing /doc/settings.nix does not cause nix build .#docs to fail and diff --recursive reports no changes with master (43a652de771aabd206ad9ce137171d0da0966198) after applying the following debugging patch on top of this PR:
diff --git a/doc/default.nix b/doc/default.nix
index 5740392..5791f66 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -336,7 +336,7 @@ let
# Permalink to view a source file on GitHub. If the commit isn't known,
# then fall back to the latest commit.
- declarationCommit = inputs.self.rev or "master";
+ declarationCommit = "43a652de771aabd206ad9ce137171d0da0966198";
declarationPermalink = "https://github.com/nix-community/stylix/blob/${declarationCommit}";
# Renders a single option declaration. Example output:
Things done
- [X] Tested locally
- [ ] Tested in testbed
- [X] Commit message follows commit convention
- [ ] Fits style guide
- [X] Respects license of any existing code used
Notify maintainers
@danth
This feels like a duplicate of https://github.com/nix-community/stylix/pull/1212 ?
Or I guess more of a subset of it.
This feels like a duplicate of #1212 ?
Or I guess more of a subset of it.
I did not thoroughly review that PR yet, but when I skimmed over it, I wondered if /doc/settings.nix could already be removed even without the additional simplifications from that PR. And that seems to be the case. Considering this PR works on its own and for how long this /doc/settings.nix workaround has existed, it seems worth merging this PR separately.
Just waiting on @danth's approval in case something non-obvious has been missed, which is the reason this has not already been removed.
Just waiting on [danth]'s approval in case something non-obvious has been missed, which is the reason this has not already been removed.
Let's just optimistically merge this for now.
Successfully created backport PR for release-25.05:
- #1491