stylix/mk-target: sort optional arguments

This commit is contained in:
NAHO 2025-07-19 11:28:32 +02:00
parent a4ffbc20ea
commit 25354cc88b
No known key found for this signature in database
GPG key ID: BFB5D5E3F4C95185

View file

@ -82,21 +82,6 @@
The default (`true`) is inherited from `mkEnableTargetWith`. The default (`true`) is inherited from `mkEnableTargetWith`.
`enableExample` (Boolean or literal expression)
: An example to include on the enable option. The default is calculated
automatically by `mkEnableTargetWith` and depends on `autoEnable` and
whether an `autoEnableExpr` is used.
`extraOptions` (Attribute set)
: Additional options to be added in the `stylix.targets.${name}` namespace
along the `stylix.targets.${name}.enable` option.
For example, an extension guard used in the configuration can be declared
as follows:
```nix
{ extension.enable = lib.mkEnableOption "the bloated dependency"; }
```
`configElements` (List or attribute set or function or path) `configElements` (List or attribute set or function or path)
: Configuration functions that are automatically safeguarded when any of : Configuration functions that are automatically safeguarded when any of
their arguments is disabled. The provided `cfg` argument conveniently their arguments is disabled. The provided `cfg` argument conveniently
@ -125,6 +110,21 @@
) )
``` ```
`enableExample` (Boolean or literal expression)
: An example to include on the enable option. The default is calculated
automatically by `mkEnableTargetWith` and depends on `autoEnable` and
whether an `autoEnableExpr` is used.
`extraOptions` (Attribute set)
: Additional options to be added in the `stylix.targets.${name}` namespace
along the `stylix.targets.${name}.enable` option.
For example, an extension guard used in the configuration can be declared
as follows:
```nix
{ extension.enable = lib.mkEnableOption "the bloated dependency"; }
```
`generalConfig` (Attribute set or function or path) `generalConfig` (Attribute set or function or path)
: This argument mirrors the `configElements` argument but intentionally : This argument mirrors the `configElements` argument but intentionally
lacks automatic safeguarding and should only be used for complex lacks automatic safeguarding and should only be used for complex
@ -176,9 +176,9 @@
autoEnable ? null, autoEnable ? null,
autoEnableExpr ? null, autoEnableExpr ? null,
autoWrapEnableExpr ? null, autoWrapEnableExpr ? null,
configElements ? [ ],
enableExample ? null, enableExample ? null,
extraOptions ? { }, extraOptions ? { },
configElements ? [ ],
generalConfig ? null, generalConfig ? null,
imports ? [ ], imports ? [ ],
}@args: }@args: