Commit Graph

2 Commits

Author SHA1 Message Date
Benedikt Rips
a93d80bcec treewide: remove unused attrs patterns 2026-04-13 22:02:40 -05:00
philip-730
92d382b982 programs.wezterm: add settings option
Add a `settings` option that allows WezTerm to be configured
declaratively using a Nix attribute set. Settings are serialized to
Lua using `lib.generators.toLua`. Raw Lua expressions such as
`wezterm.font` and `wezterm.action.*` can be embedded using
`lib.generators.mkLuaInline`.

When `settings` is set, `extraConfig` is still supported. It is
wrapped in an immediately invoked function expression so that any
`return` statement (including the common `return {}` and
`return config` patterns) is captured and merged on top of the
generated settings, preserving full backward compatibility.

The merge between `settings` and `extraConfig` is shallow: a key
returned from `extraConfig` replaces the entire corresponding value
from `settings`, including nested tables and arrays.

Closes #6047
2026-04-07 13:39:56 -05:00