doc: note modules must check stylix.enable

Added a note to the docs to clarify that a target module must always
check the global `stylix.enable`, in addition to its own `enable` option.
This commit is contained in:
Matt Sturgeon 2025-05-11 22:04:05 +01:00
parent 030af3e071
commit 94e68af4a4
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -58,6 +58,13 @@ A general format for modules is shown below.
}
```
> [!CAUTION]
> You **must** check _both_ `config.stylix.enable` _and_ your target's own
> `enable` option before defining any config.
>
> In the above example this is done using
> `config = lib.mkIf (config.stylix.enable && config.stylix.targets.«name».enable)`.
The human readable name will be inserted into the following sentence:
> Whether to enable theming for «human readable name».