Personal dotfiles managed with chezmoi, with bootstrap scripts for Linux and Windows.
# 1) Install/apply dotfiles directly
chezmoi init --apply ghaith/dotfiles
# or bootstrap from curl
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ghaith/dotfiles/main/install.sh)"
# 2) Open a new shell and verify node/pi
node -v && pi --helpThis repo installs and configures:
- shell:
zsh, shared shell config forbash+zsh - editor/tools:
neovim,helix,ripgrep,fd,fzf,bat,eza,zoxide,starship,atuin,git-delta - language/runtime:
go,rust,fnm+ Node LTS - pi agent:
@mariozechner/pi-coding-agent - fonts/themes helpers: Nerd Fonts, tmux catppuccin plugin
install.sh– Linux bootstrap (packages + fnm/node + pi + chezmoi init/apply).chezmoiscripts/run_once_before_00-bootstrap.sh– runs bootstrap when initialized through chezmoirun_after_install-pi-extensions.sh– installs npm deps for pi extensionsrun_after_install-tmux-catppuccin.sh– installs tmux catppuccin plugincreate_private_dot_gitconfig.local.tmpl– seeds~/.gitconfig.localonce, then never touches itdot_*,private_dot_*,dot_config/– managed dotfiles/templates
chezmoi init --apply ghaith/dotfilesWhat happens:
- chezmoi clones/applies dotfiles
.chezmoiscripts/run_once_before_00-bootstrap.shcallsinstall.sh --from-chezmoi- packages and runtimes are installed
- shell/npm/fnm/pi setup is configured
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ghaith/dotfiles/main/install.sh)"If the local dotfiles source directory does not exist, install.sh automatically falls back to:
https://github.com/ghaith/dotfiles.git
and runs chezmoi init --apply against that repo.
--from-chezmoi Run bootstrap tasks without calling `chezmoi init`
--skip-chezmoi-init Alias for --from-chezmoi
--source <path|repo> Override chezmoi source (local path or remote repo URL)
Also supported via env var:
CHEZMOI_SOURCE=<path|repo>
Examples:
./install.sh --source ~/src/dotfiles
./install.sh --source https://github.com/ghaith/dotfiles.git
CHEZMOI_SOURCE=~/src/dotfiles ./install.shfnm is initialized in shared shell config with:
fnm env --shell zsh --use-on-cd(zsh)fnm env --shell bash --use-on-cd(bash)
Bootstrap installs Node LTS and sets it as default:
fnm install --lts
fnm default lts-latestThis ensures node/npm are available for pi after install.
Windows is a config-only target — nothing is installed and no shell
config is deployed. .chezmoiignore narrows it to an allowlist:
| Target | Notes |
|---|---|
.config/nvim |
needs XDG_CONFIG_HOME, see below |
.config/wezterm |
terminal of choice on Windows |
.config/starship |
needs STARSHIP_CONFIG pointing at it |
.gitconfig |
Windows needs two user-scope variables (no admin required; restart the shell after setting them):
[Environment]::SetEnvironmentVariable("XDG_CONFIG_HOME", "$env:USERPROFILE\.config", "User")
[Environment]::SetEnvironmentVariable("GIT_CONFIG_GLOBAL", "$env:USERPROFILE\.gitconfig", "User")XDG_CONFIG_HOME— Neovim on Windows reads%LOCALAPPDATA%\nvimunless this is set. Also fixes starship, bat, and anything else XDG-aware.GIT_CONFIG_GLOBAL— on a domain-joined machineHOMEDRIVEis a network share, so git resolves~to it and ignores the config chezmoi writes under%USERPROFILE%. This repoints git's global config without movingHOME(which would orphan SSH keys and anything else on the share). The corporate config is pulled back in as a low-precedence[include], so local settings win and git keeps working when the share is offline.
destDiris pinned to%USERPROFILE%in.chezmoi.toml.tmpl. Without it, running chezmoi from Git Bash targets the network share (Git Bash derivesHOMEfromHOMEDRIVE) while PowerShell targetsC:\Users\<user>— two different destinations sharing one state database.
Install the tools you want by hand — user-local installs are fine and no package manager is assumed — then:
chezmoi init --apply.chezmoiscripts/ is skipped entirely on Windows. The scripts are POSIX
shell, and Windows has no shebang support, so chezmoi's fork/exec of the
extracted .sh fails with %1 is not a valid Win32 application and aborts
the whole apply.
From an existing machine:
chezmoi update
chezmoi applyPreview changes first:
chezmoi diffsudo pacman -Syucd ~/dotfiles/nixos
nix flake update
sudo nixos-rebuild switch --flake .#$(hostname)nix profile upgrade --allMore NixOS notes live in nixos/README.md.
Default install now includes:
shellcheck— shell lintingtypos+typos-lsp— typo checking for code and proseharper— lightweight English grammar/style checksvim-spell-en— Neovim English spell files
Optional Arch packages for extra Neovim spell languages:
sudo pacman -S vim-spell-de vim-spell-fr vim-spell-nl vim-spell-es- Check node availability:
fnm currentnode -vnpm -v
- Re-open shell after first install (
exec zshor new terminal) - If chezmoi source is wrong, pass explicit source:
./install.sh --source https://github.com/ghaith/dotfiles.git