Replace the module-local `impureConfigMerger` with
`lib.hm.generators.mkImpureConfigMerger`, keeping the JSON5 reader for
settings that may contain comments.
Behavior is preserved but two rough edges are fixed along the way:
- A corrupted existing file now fails activation loudly instead of
silently replacing the user's settings with the generated defaults.
- An existing file keeps its permissions and symlink target instead of
being replaced with a fresh mode-644 file.
Add a test that runs the generated activation snippet with `$DRY_RUN` and
`$VERBOSE` set, covering a dry-run that leaves existing settings
untouched, a live merge on top of preexisting settings, verbose logging,
silent quiet mode, permission preservation, and loud failure on a
corrupted file.
Assisted-by: Goose + GLM 5.3 Flash
The remote server executable in the zed-editor package has a '+stable'
appended at the end now. This uses the remoteServerExecutableName
attribute from the zed-editor package instead of guessing.
Add `mutableUserDebug` and `userDebug` options to generate `debug.json` file.
The options are heavily inspired by `mutableUserTasks` and `userTasks` options implementation.
Closes#8091
Zed uses JSON5 for settings files. JQ doesn't understand that format and
fails if found, when merging with preexisting settings.
Here I add a conversion step that converts JSON5 to JSON before handling
the contents to JQ.
Besides, I changed the arguments in the jq function, so instead of using
`[0]` and `[1]`, we now use `$dynamic` and `$static` respectively. This
should make scripts more readable.
Fixes https://github.com/nix-community/home-manager/issues/7247
Fixes https://github.com/nix-community/home-manager/issues/7226