Add and partially apply the mkTarget function to all appropriate
modules, providing a consistent target interface to minimize boilerplate
and automatically safeguard declarations related to disabled options.
The mkTarget function was first discussed in [1] ("extensive mkTarget
function").
[1]: https://github.com/danth/stylix/discussions/1009
Link: https://github.com/danth/stylix/pull/1130
Co-authored-by: Daniel Thwaites <danth@danth.me>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Add the mkTarget function, providing a consistent target interface to minimize boilerplate
and automatically safeguard declarations related to disabled options.
The mkTarget function was first discussed in [1] ("extensive mkTarget
function").
[1]: https://github.com/danth/stylix/discussions/1009
The `stylix.testbed.enable` option is needed to determine which testbeds
to include in flake outputs. However evaluating a NixOS system is
expensive, and significantly impacts the performance of `nix flake show`.
We work around this issue by adding minimal configuration, which
evaluates the testbed module on its own, without any nixos modules.
This has plenty of downsides, but we're unlikely to run into any of them
here.
Potential future issues:
1. A testbed module requiring a non-standard module arg.
This could be solved by adding stubs to `_module.args`.
2. The enable option depending on an overlayed `pkgs` instance.
This could be solved by implementing the `nixpkgs.overlays` option.
3. The enable option depending on another Stylix or NixOS option.
This cannot be supported without massive performance hits.
Revert the improval of how discord testbed is disabled to get the proper
commit structure into the commit history.
Reverts: 5113479d69 ("stylix: improve how discord testbed is disabled (#1291)")
Update and unlock the tinted-kitty input because the issue from commit
f95022bb6e ("stylix: downgrade and lock tinted-kitty input (#589)")
seems to have resolved itself.
Link: https://github.com/nix-community/stylix/pull/1308
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Include the packages in the checks output to resolve the regression
introduced in commit 8b015b5fa0 ("flake: use flake-parts (#1208)").
Fixes: 8b015b5fa0 ("flake: use flake-parts (#1208)")
Link: https://github.com/danth/stylix/pull/1285
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
The global `stylix.enable` option is not relevant to the per-target
`enable` option's default.
The individual modules should already be gated behind `stylix.enable`,
so there is no need for it to also affect the value of
`stylix.targets.«name».enable`.
This should not produce any change in behavior for correctly written
modules.
---
To give a concrete example:
```nix
{
stylix.enable = false;
stylix.autoEnable = true;
stylix.targets.foo.enable = true;
}
```
Here, the `stylix.enable` option is set to `false`, so no targets should
be enabled, regardless of their per-target `enable` option's value.
However if the `foo` target assumes it only needs to read its own
`enable` option, in this example it would define its config even though
Stylix is disabled globally.