Dotfiles
May 12, 2026 ยท View on GitHub
These dotfiles are managed with chezmoi.
Managed files live in the dot_*, dot_config, .chezmoidata, and .chezmoiscripts paths.
Current Machine Cutover
Install chezmoi if needed:
brew install chezmoi
Initialize chezmoi against this checked-out repo:
chezmoi --source "$PWD" init --promptDefaults
Preview changes:
chezmoi --source "$PWD" apply --dry-run --verbose
Apply changes:
chezmoi --source "$PWD" apply --verbose
Because this machine was previously stowed, the first apply replaces managed stow symlinks in $HOME with regular files/directories rendered by chezmoi.
The legacy stow directories have been removed. Rofi config is intentionally not migrated yet because the Linux desktop setup is expected to be overhauled, but related command dependencies are represented in the Linux desktop package group.
New Machine
Install chezmoi into ~/.local/bin first:
sh -c "$(curl -fsLS https://get.chezmoi.io)" -- -b "$HOME/.local/bin"
Then initialize and apply this repo:
~/.local/bin/chezmoi init --apply <repo-url>
For private repos, use the SSH URL:
~/.local/bin/chezmoi init --apply git@github.com:<user>/<repo>.git
During init, .chezmoi.toml.tmpl creates local machine data in ~/.config/chezmoi/chezmoi.toml.
Machine Data
Each machine has local data like this:
[data.machine]
role = "desktop" # desktop or server
[data.packages]
manager = "brew" # brew, apt, pacman, or none
groups = ["base", "nvim", "desktop", "macos-desktop"]
Servers should usually use:
[data.machine]
role = "server"
[data.packages]
manager = "apt"
groups = ["base", "nvim", "server"]
Profiles
There is one chezmoi source tree, but it renders different results by OS and role.
OS controls platform-specific files:
- macOS desktop applies AeroSpace and SketchyBar
- Linux desktop currently installs desktop packages only; Hyprland, SwayNC, and Waybar configs are intentionally rebuilt per machine for now
- non-matching OS files are ignored through
.chezmoiignore
Role controls how much of the setup is applied:
desktopgets shared terminal/editor config plus GUI desktop packages for the current OS, including Ghostty configservergets shared terminal/editor config and avoids GUI desktop packages/configs
Neovim's lua/local/profile.lua is generated per host from [data.features.nvim] in ~/.config/chezmoi/chezmoi.toml. The default desktop profile enables optional UI/workflow plugins like Obsidian, Dadbod, REST, Windsurf, undo-glow, and Milli. The default server profile disables those heavier optional plugins while keeping core Neovim and Neogit enabled.
Packages
Package declarations live in .chezmoidata/package_catalog.yaml.
The install script .chezmoiscripts/run_onchange_10-install-packages.sh.tmpl supports:
- Homebrew on macOS
- apt on Debian/Ubuntu-style Linux
- pacman on Arch-style Linux
Package groups are selected per host through ~/.config/chezmoi/chezmoi.toml.
Run dependency installation explicitly with:
chezmoi apply --include scripts --verbose
Daily Use
Preview local changes:
chezmoi diff
Apply local source changes:
chezmoi apply --verbose
Pull and apply remote changes:
chezmoi update --verbose
Edit a managed target:
chezmoi edit ~/.config/nvim/init.lua