stylix: remove cfg.enable from mkEnableTarget default
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.
This commit is contained in:
parent
b460904a6f
commit
030af3e071
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@
|
|||
humanName: autoEnable:
|
||||
lib.mkEnableOption "theming for ${humanName}"
|
||||
// {
|
||||
default = cfg.enable && cfg.autoEnable && autoEnable;
|
||||
default = cfg.autoEnable && autoEnable;
|
||||
example = !autoEnable;
|
||||
}
|
||||
// lib.optionalAttrs autoEnable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue