Personal config files managed with chezmoi.
dot_config/
wezterm/ → ~/.config/wezterm/
zed/ → ~/.config/zed/
Code/User/ → ~/.config/Code/User/
nushell/ → ~/.config/nushell/
dot_ideavimrc → ~/.ideavimrc
.stylua.toml → ~/.stylua.toml
run_once_windows_setup.ps1 (creates AppData junctions on Windows)
run_once_macos_setup.sh (creates ~/Library symlink for nushell on macOS)
On macOS/Linux, chezmoi places files directly into ~/.config/.
On Windows, most apps read from %APPDATA%\ — a one-time junction setup
redirects those paths to ~/.config/ so everything stays in sync.
WezTerm is the exception: it natively reads ~/.config/wezterm/ on all
platforms, so no junction is needed.
| App | Windows reads from | Chezmoi writes to |
|---|---|---|
| Zed | %APPDATA%\Zed |
~/.config/zed |
| VSCode | %APPDATA%\Code\User |
~/.config/Code/User |
| Nushell | %APPDATA%\nushell |
~/.config/nushell |
| WezTerm | (reads ~/.config/wezterm natively) |
~/.config/wezterm |
Nushell on macOS looks in ~/Library/Application Support/nushell instead of
~/.config/nushell. The setup script creates a symlink so both point to the
same place.
# Windows
winget install twpayne.chezmoi
# macOS
brew install chezmoi
⚠️ WezTerm nightly is required. The last stable release (20240203, Feb 2024) has a reedline repaint bug with modern Nushell: each keystroke pushes the prompt down, leaving blank lines in the scrollback. This is fixed only in nightly builds.winget/brewinstall the stable channel, so on Windows you must install the nightly manually.
# Windows — install the NIGHTLY (winget only tracks stable, which is too old)
$exe = "$env:TEMP\WezTerm-nightly-setup.exe"
Invoke-WebRequest -Uri "https://github.com/wezterm/wezterm/releases/download/nightly/WezTerm-nightly-setup.exe" -OutFile $exe
& $exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS
# macOS — nightly
brew install --cask wezterm@nightlyTo upgrade WezTerm later on Windows, re-run the download-and-install command above (winget will report "no upgrade" because nightly is off-channel).
# Clone the repo
git clone git@github.com:DawenYang/dotfiles.git ~/dotfiles
# Point chezmoi at it (one-time, per machine)
# Windows — write chezmoi.toml manually (no [chezmoi] section wrapper):
echo 'sourceDir = "C:/Dev/dotfiles"' > ~/.config/chezmoi/chezmoi.toml
# macOS/Linux
echo 'sourceDir = "~/dotfiles"' > ~/.config/chezmoi/chezmoi.tomlWindows note:
chezmoi init --source <path>does NOT persist the source path. Writechezmoi.tomlmanually using flat TOML (no[chezmoi]section).
chezmoi applyThis places all config files and runs the platform setup script once:
- Windows —
run_once_windows_setup.ps1: creates%APPDATA%junctions for Zed, VSCode, and Nushell. - macOS —
run_once_macos_setup.sh: symlinks~/Library/Application Support/nushell→~/.config/nushell.
If an AppData directory already exists (app was previously installed), the Windows script will warn instead of overwriting. In that case:
- Close the app
- Move its contents to the corresponding
~/.config/<app>directory - Delete the original AppData directory
- Re-run:
chezmoi apply
chezmoi updatechezmoi manages two locations:
- Source — the repo (
dot_config/zed/settings.json, etc.) - Target — the actual config files placed at
~/.config/
When you edit a config file directly in the repo (source), commit and push:
czpush "describe your change"When an app (e.g. Zed) modifies its config via the GUI, it writes to the target. The source (repo) won't know about it until you sync back:
czr # copies target → source (re-adds changed files)
czd # preview what changed
czpush "describe your change"How the sync path works on Windows:
repo (source) →[chezmoi apply]→ ~/.config/zed/ ←[junction]← %APPDATA%\Zed\ repo (source) ←[chezmoi re-add]← ~/.config/zed/The junction makes
%APPDATA%\Zedand~/.config/zed/the same directory.chezmoi re-addis still required to propagate GUI-driven changes back to the repo.
Add an entry to $Mappings in run_once_windows_setup.ps1:
@{
Name = "AppName"
Source = "$env:APPDATA\AppName" # where Windows looks
Target = "$env:USERPROFILE\.config\appname" # where chezmoi puts it
}Then add the config files under dot_config/appname/ in the repo.
If the app natively respects ~/.config/<app> (like WezTerm), just add the
config files under dot_config/<appname>/ — no script changes required.