Optionalize mkTarget's 'humanName' and 'name' arguments by inferring
'humanName' from the 'name' attribute in the /modules/<MODULE>/meta.nix
file, and 'name' from the /modules/<NAME>/ directory name.
Inferring the 'humanName' and 'name' arguments ensures consistency and
reduces boilerplate.
The 'humanName' and 'name' arguments are optionalized instead of removed
because complex modules generating target derivations need to
distinguish between them.
Closes: https://github.com/nix-community/stylix/issues/1661
Rename mkTarget's 'configElements' argument to 'config' and
'extraOptions' to 'options' to provide a more transparent interface with
the underlying Nixpkgs module system.
Allow choosing the testbed desktop, ideally as a temporary solution
until migrating to the cage environment.
Link: https://github.com/nix-community/stylix/pull/1222
Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
BREAKING CHANGE: The fontconfig target no longer enables Home Manager's
fonts.fontconfig.enable option and now sets Home Manager's
fonts.fontconfig.defaultFonts option instead.
Link: https://github.com/nix-community/stylix/pull/1292
Reviewed-by: awwpotato <awwpotato@voidq.com>
Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This allows correctly documenting dynamic enable conditions.
E.g:
```nix
enable = mkEnableTargetWith {
name = "QT";
autoEnable = pkgs.stdenv.hostPlatform.isLinux;
autoEnableExpr = "pkgs.stdenv.hostPlatform.isLinux";
};
```
`autoEnableExpr` will be wrapped in parentheses if it contains a nix
operator with lower precedence than `&&`.
Added a note in the docs mentioning `mkEnableTarget` should either have
a static `autoEnable` or specify `autoEnableExpr`.
Adds:
- `serve-docs` to the default devShell
- `packages.serve-docs`
- `apps.docs`
Having `apps.docs` defined causes `nix run .#docs` to run the "app"
instead of `packages.docs`. `nix build .#docs` will still build the
"package", not the "app".
The `serve-docs` script added to the devShell runs `nix run .#docs`
instead of having `packages.serve-docs` in its closure. This avoids the
devShell actually building the docs.
Added a note to `doc/src/modules.md`.
Link: https://github.com/nix-community/stylix/pull/1328
Reviewed-by: awwpotato <awwpotato@voidq.com>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
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