Managed by chezmoi. Works on personal and work WSL2 Ubuntu machines.
# 1. Run the appropriate WSL2 setup script first (from PowerShell on Windows)
.\Setup-WSL2.ps1
# 2. Run the appropriate Ubuntu setup script (from inside WSL)
bash scripts/Setup-Home-Ubuntu.sh # personal machine
bash scripts/Setup-Work-Ubuntu.sh # work/corporate machine
# 3. Bootstrap dotfiles
bash install.shinstall.sh will:
- Install chezmoi
- Clone this repo to
~/.local/share/chezmoi - Prompt you once for context, name, email, and GitHub username
- Apply all dotfiles
- Install zsh-autosuggestions and zsh-syntax-highlighting
chezmoi update # pull latest changes + re-apply| File | Notes |
|---|---|
~/.zshrc |
nvm, SSH agent, aliases, plugins, Starship |
~/.bashrc |
nvm, SSH agent, Starship (bash fallback) |
~/.gitconfig |
identity, aliases, context-specific settings |
~/.ssh/config |
GitHub + context-specific hosts |
~/.config/starship/starship.toml |
prompt config, same on all machines |
On first run you choose a context. This is cached and never re-prompted.
| Context | DNS | Windows PATH | Git URL rewrite |
|---|---|---|---|
personal |
WSL auto-managed | available | SSH over HTTPS |
work |
manual (VPN DNS) | excluded | — |
To re-answer prompts on an existing machine:
chezmoi init --force && chezmoi apply# Edit a managed file
chezmoi edit ~/.zshrc
# Preview changes before applying
chezmoi diff
# Apply changes
chezmoi apply
# Pull latest from GitHub + apply
chezmoi update
# See current chezmoi data (name, email, context, etc.)
chezmoi datachezmoi add ~/.config/some/config
chezmoi edit ~/.config/some/config
chezmoi apply
chezmoi cd # opens a shell in the source directory
git add . && git commit -m "add some/config" && git push| Script | Purpose |
|---|---|
scripts/Setup-WSL2.ps1 |
Windows side — features, WSL install, distro, networking |
scripts/Setup-Home-Ubuntu.sh |
Linux side — personal machine provisioning |
scripts/Setup-Work-Ubuntu.sh |
Linux side — work/corporate machine provisioning |
dotfiles/
├── .chezmoi.toml.tmpl # machine prompts (context, name, email, githubUser)
├── install.sh # idempotent bootstrap script
├── README.md
├── dot_zshrc.tmpl # → ~/.zshrc
├── dot_bashrc.tmpl # → ~/.bashrc
├── dot_gitconfig.tmpl # → ~/.gitconfig
├── dot_config/
│ └── starship/
│ └── starship.toml # → ~/.config/starship/starship.toml
├── dot_ssh/
│ └── config.tmpl # → ~/.ssh/config
└── scripts/
├── Setup-WSL2.ps1
├── Setup-Home-Ubuntu.sh
└── Setup-Work-Ubuntu.sh