My personal dotfiles, managed with chezmoi.
Tested on:
- macOS (Sonoma+)
- Arch Linux (Hyprland + sddm)
- Install chezmoi:
- macOS:
brew install chezmoi - Arch:
sudo pacman -S chezmoi
- macOS:
chezmoi init --apply git@github.com:danilpavlov/dotfiles.gitThis will:
- Clone the repo into
~/.local/share/chezmoi. - Run
run_once_before_*scripts to install oh-my-zsh and its plugins. - Render templates and write your
~/.zshrc,~/.config/...files. - Run
run_onchange_30-install-packages.shto install the packages from the manifest (Brewfileon macOS,pacman+ AUR viaparuon Arch).
After it finishes, copy and fill in the secrets template:
cp ~/.config/zsh/work.zsh.example ~/.config/zsh/work.zsh
$EDITOR ~/.config/zsh/work.zshOpen a new terminal and you're done.
dotfiles/
├── dot_zshrc.tmpl # → ~/.zshrc (thin, sources modules)
├── dot_config/
│ ├── zsh/
│ │ ├── aliases.zsh # shared aliases
│ │ ├── functions.zsh # dev() and friends
│ │ ├── exports.zsh # env vars + tool integrations
│ │ ├── path.zsh # PATH wiring + pyenv init
│ │ └── work.zsh.example # template for per-machine secrets
│ ├── nvim/ # LazyVim
│ ├── tmux/tmux.conf
│ ├── ghostty/config.tmpl # OS-templated (cmd+s on macOS, ctrl+s on Linux)
│ ├── bat/, btop/, eza/, htop/, posting/
│ └── hypr/ # Hyprland — populated on Arch
├── packages/
│ ├── Brewfile
│ ├── arch-pacman.txt
│ └── arch-aur.txt
├── run_once_before_10-install-omz.sh.tmpl
├── run_once_before_20-install-omz-plugins.sh.tmpl
├── run_onchange_30-install-packages.sh.tmpl
└── docs/ # spec + plan history
chezmoi add ~/.config/<tool>/<file>— pulls the file into the source dir.- Edit in the source dir:
chezmoi edit ~/.config/<tool>/<file>. - Apply:
chezmoi apply. - Commit in the dotfiles repo.
For OS-specific bits, rename the file to <name>.tmpl and use Go template directives:
{{ if eq .chezmoi.os "darwin" -}}
mac-only line
{{- else if eq .chezmoi.os "linux" -}}
linux-only line
{{- end }}
Don't commit them. ~/.config/zsh/work.zsh is gitignored. The example file (work.zsh.example) is committed as a template.
Live in their own repo: https://github.com/danilpavlov/wallpapers
gd— go to definitiongr— go to referencesgc— toggle comment (visual)<space><space>— telescope find file<space>/— telescope grep