Personal dev environment — managed with chezmoi.
Stack: Bash · VS Code
Environment: WSL2 Ubuntu + Windows
Tools: nvm · pyenv · Miniconda · EDB PostgreSQL 17 + PostGIS · Memurai
# Run as Administrator in PowerShell
Set-ExecutionPolicy Bypass -Scope Process -Force
powershell -File windows\windows-setup.ps1Installs: Memurai (Redis), VS Code, JetBrainsMono Nerd Font, .wslconfig
# One-liner bootstrap (no dotfiles needed yet)
bash <(curl -fsSL https://raw.githubusercontent.com/NgoHuuLoc0612/dotfiles/main/scripts/bootstrap.sh)
# Or clone first
git clone https://github.com/YOUR_GITHUB/dotfiles ~/.local/share/chezmoi
bash ~/.local/share/chezmoi/scripts/bootstrap.shBootstrap installs:
- nvm + Node LTS, pnpm, tsx, typescript
- pyenv + Python 3.12, ruff, black, uv
- Miniconda (base not auto-activated)
- Rust + cargo
- EDB PostgreSQL 17 + PostGIS (native, no Docker)
- fzf, ripgrep, bat, eza, delta, starship
- chezmoi, gh CLI
- JetBrainsMono Nerd Font
chezmoi init --apply https://github.com/NgoHuuLoc0612/dotfiles
exec bashdotfiles/
├── home/ # Mapped to $HOME by chezmoi
│ ├── dot_bashrc # → ~/.bashrc
│ ├── dot_bash_profile # → ~/.bash_profile
│ ├── dot_gitignore_global # → ~/.gitignore_global
│ └── dot_config/
│ ├── git/
│ │ └── config.tmpl # → ~/.config/git/config (templated)
│ ├── vscode_settings.json # copy to VS Code manually or via script
│ └── vscode_extensions.txt # install via: xargs code --install-extension
├── scripts/
│ └── bootstrap.sh # Full dev environment setup
├── windows/
│ └── windows-setup.ps1 # Memurai, fonts, .wslconfig, VS Code extensions
├── docs/
└── .chezmoi.toml.tmpl # chezmoi config template
# Add a file to chezmoi
chezmoi add ~/.bashrc
# Edit a managed file
chezmoi edit ~/.bashrc
# See what would change
chezmoi diff
# Apply changes
chezmoi apply
# Pull + apply from remote
chezmoi update
# Push changes to git
cd ~/.local/share/chezmoi && git pushAliases (defined in .bashrc):
cm → chezmoi
cma → chezmoi add
cmu → chezmoi update
cmd → chezmoi diff
cmap → chezmoi apply
dotfiles → cd ~/.local/share/chezmoi
# Linux/WSL2
cp ~/.local/share/chezmoi/home/dot_config/vscode_settings.json \
~/.config/Code/User/settings.json
# Install extensions
cat ~/.local/share/chezmoi/home/dot_config/vscode_extensions.txt \
| grep -v '^#' | grep -v '^$' \
| xargs -L1 code --install-extensionSecrets are encrypted with age via chezmoi.
# Generate key (first time)
age-keygen -o ~/.config/chezmoi/key.txt
# Add an encrypted secret
chezmoi add --encrypt ~/.ssh/id_ed25519
# The encrypted file is stored safely in the repo| Service | From WSL2 | From Windows |
|---|---|---|
| PostgreSQL | psql -U postgres (local socket) |
localhost:5432 |
| Memurai | redis-cli -h $WSL_HOST_IP |
localhost:6379 |
| Dev server | http://localhost:PORT |
http://localhost:PORT (mirrored networking) |
.wslconfigusesnetworkingMode=mirrored— ports are shared automatically.