Skip to content

feat(wrapperModules.zed): init#561

Open
SibaldH wants to merge 4 commits into
BirdeeHub:mainfrom
SibaldH:feat/zed-wrapper
Open

feat(wrapperModules.zed): init#561
SibaldH wants to merge 4 commits into
BirdeeHub:mainfrom
SibaldH:feat/zed-wrapper

Conversation

@SibaldH

@SibaldH SibaldH commented Jun 8, 2026

Copy link
Copy Markdown

Summary

Adds a new zed wrapper module.

This provides a Home Manager-like declarative interface for Zed without depending on Home Manager. The wrapper can generate Zed config files and symlink them into the user’s $XDG_CONFIG_HOME/zed directory before launching Zed.

Supported options include:

  • userSettings for settings.json
  • userKeymaps for keymap.json
  • userTasks for tasks.json
  • userDebug for debug.json
  • extensions, translated into auto_install_extensions
  • themes, supporting generated JSON themes and existing theme file paths
  • linkConfig, to control whether generated config is symlinked on launch
  • forceSymlinks, to opt into replacing existing user config files or symlinks

Design notes

Zed expects its configuration files in the user config directory, so this wrapper does not try to pass a custom config path to Zed. Instead, it generates the config files into the wrapper derivation using constructFiles, then links individual files into $XDG_CONFIG_HOME/zed when the wrapped binary starts.

The default behavior is intentionally conservative: existing real files or unrelated symlinks are not overwritten unless forceSymlinks = true is set.

Testing

  • nix fmt
  • nix build ./ci#checks.x86_64-linux.wrapperModule-zed -Lv
  • nix flake check -Lv ./ci

Reviewer notes

I opened this as a draft because I would like feedback on the config-linking approach.

In particular, I would appreciate feedback on:

  1. whether linkConfig = true is a good default;
  2. whether the forceSymlinks safety behavior matches the expectations of this repository;
  3. whether the option names should stay close to Home Manager’s Zed module names or use more generic wrapper-module naming.

@SibaldH SibaldH changed the title Zed wrapperModule feat(wrapperModules.zed): init Jun 9, 2026
@SibaldH SibaldH marked this pull request as ready for review June 9, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant