-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
treewide: add stylix.enable
option
#244
Conversation
b9cb6f3
to
b4b0b2e
Compare
stylix.enable
option
b4b0b2e
to
08564c3
Compare
I don't have the bandwidth to test this PR, seeing that it has been stale for ~3 months I'll mark it as ready, and if someone tests it and finds some problems I'll happily fix them. |
08564c3
to
46dda51
Compare
Ci is failing, I think we need to set |
CI is successful now: https://github.com/danth/stylix/actions/runs/8958380642. I tested @jalil-salame, could you maybe double check this PR on your setup? |
My setup relies on #201 so it would be a mess to use this PR sadly. |
I was nerd sniped into trying it out anyways, both |
I tested |
c6534b5
to
feeb35d
Compare
I'm adding this PR to my config (here if you are curious), so I'll be able to test the Linux modules a bit more thoroughly soon c: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that stylix.enable
defaults to false
, why does f957c28 cause the following error:
$ nix build .#docs
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'stylix-book'
whose name attribute is located at /nix/store/3lllcglr2ip90mkxs5q4asl98r305mia-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'patchPhase' of derivation 'stylix-book'
at /nix/store/blw4ppvzwz08gw7dxbc41pxv83qgr6pi-source/docs/default.nix:44:3:
43|
44| patchPhase = ''
| ^
45| cp ${../README.md} src/README.md
(stack trace truncated; use '--show-trace' to show the full trace)
error: A definition for option `stylix.image' is not of type `path or package convertible to it'. Definition values:
- In `/nix/store/3lllcglr2ip90mkxs5q4asl98r305mia-source/flake.nix': null
Ideally, it should be possible to revert e8e3304.
For reference, I would use the following commit message when merging this PR: stylix: add 'stylix.enable' option
Add a 'stylix.enable' option to enable or disable all Stylix modules in
order to resolve issues similar to [2].
To align with the default 'lib.mkEnableOption' [1] behavior,
'stylix.enable' defaults to 'false'.
BREAKING CHANGE: Stylix is disabled by default. To enable it, use:
stylix.enable = true;
[1]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/options.nix#L91-L105
[2]: https://github.com/danth/stylix/issues/216 |
I'd need to look at the code carefully, but if a |
Considering this merely cleans up the code, this should probably be addressed in a followup-PR. NOTE: I added a list of things that should be verified right before merging, to the first PR message. @danth, could you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this PR on top of master
and added an additional breaking change note to the top-level README.
I tested stylix.enable = false;
and stylix.enable = true;
in my Home Manger configuration once again, and so far everything works as expected.
Could someone test this in a NixOS setup?
|
Works on my configuration now that I fixed the |
I managed to do the first part with some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready to merge.
stylix.enable
optionstylix.enable
option
Not yet: although the option is not required any more, the default value for |
Is the following commit message good: stylix: add 'stylix.enable' option
Add a 'stylix.enable' option to enable or disable all Stylix modules in
order to resolve issues similar to [2].
To align with the default 'lib.mkEnableOption' [1] behavior,
'stylix.enable' defaults to 'false'.
BREAKING CHANGE: Stylix is disabled by default. To enable it, use:
stylix.enable = true;
[1]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/options.nix#L91-L105
[2]: https://github.com/danth/stylix/issues/216
Co-authored-by: Daniel Thwaites <[email protected]>
Co-authored-by: Jalil David Salamé Messina <[email protected]>
Co-authored-by: NAHO <[email protected]> |
Yep, I had already set that for auto-merge, just using ` rather than ' |
Update the 'sytlix' input, use its new 'stylix.enable' option, and conditionally set the 'stylix.image' and 'programs.mpv.scriptOpts.uosc' options based on 'stylix.enable'. Addresses: - 25e5229 - 30231a3 - danth/stylix#244
[stylix/#244][1] has been merged so I can finally stop using my fork (also I deleted that branch so it broke :p). [1]: <danth/stylix#244>
About
Add a
stylix.enable
option to enable or disable all Stylix modules in order to resolve issues similar to #216.To align with the default
lib.mkEnableOption
behavior,stylix.enable
defaults tofalse
.Breaking Change
Stylix is disabled by default. To enable it, use:
Closes
Steps
mkEnableTarget
function #397autoEnable
andmkEnableTarget
documentation #398mkEnableTarget
documentation #399Unresolved Questions
docs/settings.nix
be removed due to the newstylix.enable
option: treewide: addstylix.enable
option #244 (comment)?