stylix: guard home-manager-integration config#1494
stylix: guard home-manager-integration config#1494trueNAHO merged 1 commit intonix-community:masterfrom
Conversation
c1dcda6 to
7a71572
Compare
You can't do it as part of the option declaration, however you can do it by moving the default definition from config.stylix.base16Scheme = lib.mkIf (...) (lib.mkOptionDefault (...));That said, this doesn't solve the issue. With this approach you would get See also #1492 (comment) |
7a71572 to
3a146f3
Compare
|
CC @danth |
3a146f3 to
531ddc9
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
The patch LGTM.
@Keyruu and @paholg, could you test whether this PR resolves #1492?
For reference, I have successfully tested that this PR still evaluates my standalone Home Manager setup:
Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
I still feel like the correct thing to do is avoid evaluating
stylix.base16Schemewhenstylix.enable = false,1 however IDK how big of a treewide cleanup this will be. Such a change would (of course) be easier if we added a regression test.
Yes, improving the test suite is a slow but ongoing process 1 2. Although this part of the codebase could indeed be polished, this is surprisingly low priority and should probably just continue receiving hotfixes for the foreseeable future, until it inevitably needs to be rewritten to continue making progress on other more "important" tasks.
Footnotes
-
Ideally, none of stylix's option values would be evaluated when
stylix.enable = false↩
If so, then this PR doesn't fully address the issue. Changing a default is not sufficient to ensure |
0xda157
left a comment
There was a problem hiding this comment.
Ideally, none of stylix's option values would be evaluated when
stylix.enable = false
In that case config should be guarded by mkIf config.stylix.enable
531ddc9 to
a9e6c7f
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
LGTM. Let's wait a bit if the bug reporters also test this PR.
This PR has been successfully tested by alex-massa:
I suggest merging this PR on Monday if the bug reporters have still not replied until then, giving them 7 days to reply. For reference, #1492 has been open for two weeks and has currently 7 upvotes. |
a9e6c7f to
342c4a2
Compare
|
I have slightly updated documentation to reflect this change. |
Closes: #1492 Link: #1494 Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: awwpotato <awwpotato@voidq.com> Tested-by: https://github.com/alex-massa Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 73b7d0f)
|
Successfully created backport PR for |
Closes: #1492 Link: #1494 Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: awwpotato <awwpotato@voidq.com> Tested-by: https://github.com/alex-massa Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 73b7d0f)
Closes: nix-community#1492 Link: nix-community#1494 Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: awwpotato <awwpotato@voidq.com> Tested-by: https://github.com/alex-massa Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Do not guard on stylix.enable because the original issue from commit 73b7d0f ("stylix: guard home-manager-integration config (nix-community#1494)") seems to have resolved itself in the meantime. This allows testbeds to declare Stylix target options when Stylix is disabled. Reverts: 73b7d0f ("stylix: guard home-manager-integration config (nix-community#1494)")
Fixes #1492
Things done
Notify maintainers
@MattSturgeon