stylix/mk-target: sort optional arguments
This commit is contained in:
parent
a4ffbc20ea
commit
25354cc88b
1 changed files with 16 additions and 16 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue