Extend mkStateVersionOptionDefault so merged attrset callers can defer
warning emission to config.warnings while still exposing the effective
state-version default and option priority metadata.
Add dedicated lib tests for deferred warning behavior on both legacy and
current state versions.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Add a helper for options whose defaults change across home.stateVersion boundaries. This centralizes the warning text and documentation shape so modules do not need to hand-roll the same migration pattern at each call site.
The helper takes legacy and current branches with a runtime value plus optional static documentation text. That keeps the actual default version-gated while avoiding option docs that depend on evaluated config. Add a focused test covering the legacy warning path, the new-value path, and an explicit legacy pin that should not warn.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Upstream change is validating all maintainers against lib.maintainers,
need to merge our maintainer list in to pass doc building.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Adds support for
section = [
"abc"
{ a = 123; }
];
Which gets generated to
section=abc
section {
a=123
}
This is very useful with the new windowrule syntax, where you can
create anonymous window rules as strings and named rules as attribute
sets. See <https://wiki.hypr.land/Configuring/Window-Rules/>.
The former toSCFG implementation had several shortcomings which
did not consider a few possibilities SCFG provides. Details were lined
out in #7465.
The new interface needs more verbosity, but reflects better the
properties of the SCFG format. I also chose to use the names used in the
[Specification].
[Specification]: https://git.sr.ht/~emersion/scfg#specification-draft
At the top of maintainers.nix it says that:
> Entries here are expected to be follow the same format as described in [1]
Typo aside, [1] links to NixOS' maintainer-list.nix file off a 5 year
old commit, which contains outdated information on which maintainer
fields are required. Notably, `github` and `githubId` have since become
mandatory, while `email` was moved to the list of optional fields.
This updates the link to point to the current version of the file.
Replace naive string quoting with lib.escapeShellArg for proper shell escaping
of special characters, spaces, and quotes. Integrate with new formatShellArrayContent
for intelligent multi-line array formatting in zsh array definitions.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Add shared utility function that formats shell arrays with smart width optimization.
Packs multiple items per line based on available width (~78 chars per line) while
maintaining readability. Includes helper functions wrapLines and formatMultiLine.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>