My dotfiles for macOS and Linux (Ubuntu server / WSL), managed by chezmoi.
Linux uses apt for the system baseline and Homebrew for developer tooling. WSL-specific integrations (wslview, clip.exe) are detected at runtime.
| Tool | Description | macOS | Linux |
|---|---|---|---|
| Homebrew | Package manager | ✅ | ✅ |
| Git | Version control | ✅ | ✅ |
| mise | Multi-language version manager | ✅ | ✅ |
| Tool | Description | macOS | Linux |
|---|---|---|---|
| Zsh | Shell | ✅ | ✅ |
| Oh My Zsh | Zsh framework | ✅ | ✅ |
| Powerlevel10k | Shell theme | ✅ | ✅ |
| zsh-autosuggestions | Autosuggestions | ✅ | ✅ |
| atuin | Shell history | ✅ | ✅ |
| zoxide | Smart directory jumper | ✅ | ✅ |
| Tool | Description | macOS | Linux |
|---|---|---|---|
| Tmux | Terminal multiplexer | ✅ | ✅ |
| Neovim | Editor | ✅ | ✅ |
| Alacritty | GPU-accelerated terminal | ✅ | ❌ |
| WezTerm | GPU-accelerated terminal | ✅ | ❌ |
| Kitty | Terminal emulator | ✅ | ❌ |
| Tool | Description | macOS | Linux |
|---|---|---|---|
| LazyGit | Git TUI | ✅ | ✅ |
| fzf | Fuzzy finder | ✅ | ✅ |
| ripgrep | Fast search | ✅ | ✅ |
| fd | Fast file finder | ✅ | ✅ |
| bat | Better cat | ✅ | ✅ |
| eza | Better ls | ✅ | ✅ |
| Tool | Description |
|---|---|
| Yabai | Window manager |
| skhd | Hotkey daemon |
.
├── .chezmoi.toml.tmpl # Chezmoi config template
├── .chezmoiexternal.toml # External dependencies (oh-my-zsh, tmux, nvim)
├── .chezmoiignore # Ignored files
├── dot_Brewfile.tmpl # Homebrew packages
├── dot_functions # Shell functions
├── dot_gitconfig.tmpl # Git global config
├── dot_gitconfig_personal # Git personal identity
├── dot_p10k.zsh # Powerlevel10k theme config
├── dot_prettierrc # Prettier config
├── dot_skhdrc # skhd hotkey config (macOS)
├── dot_tmux.conf.local # Tmux config
├── dot_zshrc.common # Shared zsh config (sourced by ~/.zshrc)
├── executable_dot_yabairc # Yabai window manager config (macOS)
├── private_dot_ssh/ # SSH config (private)
├── dot_config/
│ ├── alacritty/ # Alacritty terminal config
│ ├── atuin/ # Atuin shell history config
│ ├── kitty/ # Kitty terminal config
│ ├── mise/ # mise version manager config
│ ├── opencode/ # OpenCode AI editor config
│ └── wezterm/ # WezTerm terminal config
├── run_once_install_apt_packages.sh.tmpl # Install base apt packages (Linux/WSL)
├── run_once_install_linuxbrew.sh.tmpl # Install Homebrew on Linux/WSL
├── run_once_setup_env_file.sh # Pull .env from Bitwarden
├── run_once_setup_ssh_keys.sh # Set up SSH keys
├── run_once_setup_zshrc.sh # Wire ~/.zshrc to source .zshrc.common
└── run_onchange_after_brew_bundle.sh.tmpl # Re-run brew bundle on Brewfile changes
curl -fsSL https://raw.githubusercontent.com/tomyail/dotfiles/main/install.sh -o /tmp/install.sh
bash /tmp/install.shNote: Download first, then run — the script has interactive steps (Bitwarden login/unlock) that require a real terminal and won't work via
curl | bash.
The script handles everything in order:
- macOS: installs Xcode Command Line Tools if missing
- macOS/Linux: installs Homebrew if missing
- Linux: installs base apt packages (
curl,git,zsh, …) before Homebrew - Installs Bitwarden CLI via
brew install bitwarden-cli, then guides you through login/unlock - Installs chezmoi if missing
- Runs
chezmoi init --apply tomyail - Sets zsh as the default shell
Non-interactive / CI:
export BW_SESSION=<token> # skip the Bitwarden unlock prompt
bash /tmp/install.shrun_once_install_apt_packages.sh.tmpl installs the base packages:
ca-certificates curl file git procps sudo wget zsh unzip build-essential
On WSL (detected via /proc/sys/kernel/osrelease), wslu is also installed for wslview.
run_once_install_linuxbrew.sh.tmpl then installs Homebrew, and dot_Brewfile.tmpl manages developer tools.
~/.zshrcsources~/.zshrc.commontmux, oh-my-zsh, and~/.config/nvimare pulled from.chezmoiexternal.toml- On WSL:
open → wslviewandpbcopy → clip.exeare aliased automatically if available
chezmoi doctor
chezmoi managed | rg 'zshrc|tmux|nvim'
chezmoi execute-template '{{ .chezmoi.os }}'
zsh --version && tmux -V && nvim --versionchezmoi diff # See pending changes
chezmoi edit ~/.zshrc # Edit a managed file
chezmoi add ~/.config/nvim/init.lua # Track a new file
chezmoi apply # Apply all changes
chezmoi update -v # Pull from remote and applychezmoi unmanaged # List untracked files
chezmoi doctor # Check for issues
chezmoi managed # List all managed filessh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply --purge tomyail