Complete cross-platform dotfiles configuratie met automatische tool versie management.
- Git
- Terminal/PowerShell toegang
- Internettoegang
Linux/macOS:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply <your-github-username>/dotfilesWindows (PowerShell als Administrator):
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iex "&{$(irm 'https://get.chezmoi.io/ps1')} -- init --apply <your-github-username>/dotfiles"Bij de eerste run word je gevraagd naar:
- Volledige naam - Voor git commits
- Email adres - Voor git commits
- GPG key ID - Optioneel, voor signed commits
- Is dit een persoonlijke machine? - Voor persoonlijke vs werk configuratie
- Is dit een ephemeral machine? - Voor containers/VMs (skip secrets sync)
- Is dit een development machine? - Voor extra dev tools
Herstart je terminal na installatie!
- macOS: Homebrew
- Arch Linux: pacman
- Debian/Ubuntu: apt
- Windows: winget
- Git - Version control
- Neovim - Modern text editor
- Starship - Cross-shell prompt
- mise - Development tool version manager
- age - Modern encryption tool
- ripgrep (rg) - Fast grep replacement
- fd - Fast find replacement
- bat - Modern cat replacement
- eza - Modern ls replacement
- fzf - Fuzzy finder
- delta - Better git diffs
- jq - JSON processor
- htop - Process viewer
Via mise worden automatisch geΓ―nstalleerd:
- Node.js (LTS)
- Python (3.12)
- Terraform (latest)
- kubectl (latest)
- Helm (latest)
- Go (latest)
- Rust (stable)
- Bash (.bashrc)
- Zsh (.zshrc) met Oh My Zsh
- Powerlevel10k theme
- zsh-autosuggestions
- zsh-syntax-highlighting
# Wijzigingen ophalen van de repository
chezmoi update
# Bekijk wat er zou veranderen
chezmoi diff
# Pas wijzigingen toe
chezmoi apply
# Bewerk een bestand
chezmoi edit ~/.bashrc
# Voeg een nieuw bestand toe
chezmoi add ~/.config/nieuwe-app/config
# Ga naar de source directory
chezmoi cd
# Verwijder een bestand uit chezmoi tracking
chezmoi forget ~/.some-file# Naar source directory
chezmoi cd
# Bekijk status
git status
# Commit wijzigingen
git add .
git commit -m "Update config"
git push
# Terug naar home
exit # of Ctrl+D# Bekijk geΓ―nstalleerde tools
mise ls
# Installeer een tool
mise use node@20
# Update tools
mise upgrade
# Bekijk beschikbare versies
mise ls-remote node
# Lokale .mise.toml aanmaken voor project
cd ~/mijn-project
mise use node@20 python@3.11# Genereer je persoonlijke age keypair
chezmoi age-keygen --output="$HOME/.config/chezmoi/key.txt"
# Beveilig de private key
chmod 600 ~/.config/chezmoi/key.txt
# Bekijk je public key
grep "# public key:" ~/.config/chezmoi/key.txtBELANGRIJK: Bewaar je private key (key.txt) veilig en backup hem!
# Encrypt een bestand direct
chezmoi add --encrypt ~/.ssh/id_ed25519
# Of mark een bestaand bestand als encrypted
chezmoi cd
git mv dot_example encrypted_dot_example.asc
chezmoi apply --force
# Bewerk encrypted bestanden
chezmoi edit --apply ~/.aws/credentialsVoor team gebruik, voeg public keys toe aan .chezmoi.toml.tmpl:
[age]
identity = "~/.config/chezmoi/key.txt"
recipients = [
"age1ql3z...(alice)",
"age1xyz...(bob)",
"age1abc...(charlie)"
]Herencrypt alle secrets na toevoegen van een nieuwe recipient:
chezmoi cd
# Update .chezmoi.toml.tmpl met nieuwe public key
chezmoi apply # Decrypt alles lokaal
# Re-add alle encrypted files
chezmoi managed --include encrypted | while read -r file; do
target=$(chezmoi target-path "$file")
chezmoi forget "$file"
chezmoi add --encrypt "$target"
done
git add . && git commit -m "Add new team member" && git push- Fork deze repository op GitHub
- Clone je fork lokaal:
chezmoi init --apply <your-github-username>/dotfiles
# Voeg bestanden toe
chezmoi add ~/.my-custom-config
# Maak templates voor machine-specifieke configuratie
chezmoi add --template ~/.gitconfig
# Bewerk en pas toe
chezmoi edit ~/.gitconfig
chezmoi applyGebruik chezmoi templates:
{{- if eq .chezmoi.os "darwin" }}
# macOS-specific config
{{- else if eq .chezmoi.os "linux" }}
# Linux-specific config
{{- else if eq .chezmoi.os "windows" }}
# Windows-specific config
{{- end }}Maak .local bestanden die NIET worden getracked:
~/.bashrc.local~/.zshrc.local~/.gitconfig.local~/.ssh/config.local
Deze worden automatisch geladen maar blijven privΓ©.
"Permission denied" op scripts
chezmoi cd
chmod +x .chezmoiscripts/run_*.sh*
git add . && git commit -m "Fix permissions" && git push
chezmoi apply"Bad interpreter" error
Gebruik #!/usr/bin/env bash in plaats van #!/bin/bash
Homebrew niet gevonden na installatie
# Intel Mac
eval "$(/usr/local/bin/brew shellenv)"
# Apple Silicon Mac
eval "$(/opt/homebrew/bin/brew shellenv)"
# Herstart terminalXCode Command Line Tools vereist
xcode-select --installScript execution disabled
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserPath niet bijgewerkt
# Refresh PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")Chezmoi apply mislukt
# Dry-run om te zien wat er zou gebeuren
chezmoi apply --dry-run --verbose
# Force apply (overschrijft lokale wijzigingen)
chezmoi apply --forceAge decryptie mislukt
# Controleer of key bestaat
ls -la ~/.config/chezmoi/key.txt
# Controleer permissions
chmod 600 ~/.config/chezmoi/key.txt
# Test encryptie
echo "test" | age -e -r $(grep "public key:" ~/.config/chezmoi/key.txt | cut -d: -f2) | age -d -i ~/.config/chezmoi/key.txtMise tools installeren niet
# Update mise
mise self-update
# Forceer herinstallatie
mise install --force
# Debug mode
mise doctordotfiles/
βββ .chezmoi.toml.tmpl # Hoofdconfiguratie met prompts
βββ .chezmoiignore # Platform-specifieke excludes
βββ .chezmoiexternal.toml # Externe dependencies
βββ .chezmoitemplates/ # Herbruikbare snippets
β βββ shell_aliases
β βββ shell_functions
βββ .chezmoiscripts/ # Setup scripts
β βββ run_once_before_00-install-prerequisites.sh.tmpl
β βββ run_once_before_00-install-prerequisites.ps1.tmpl
β βββ run_once_before_01-install-mise.sh.tmpl
β βββ run_once_before_01-install-mise.ps1.tmpl
βββ dot_bashrc.tmpl # Bash configuratie
βββ dot_zshrc.tmpl # Zsh configuratie
βββ dot_gitconfig.tmpl # Git configuratie
βββ dot_config/
β βββ mise/
β β βββ config.toml.tmpl # Mise global config
β βββ nvim/
β β βββ init.lua # Neovim config
β βββ starship.toml.tmpl # Starship prompt
βββ private_dot_ssh/
β βββ config.tmpl # SSH config
βββ README.md # Deze file
# Update chezmoi zelf
chezmoi upgrade
# Update mise
mise self-update
# Update alle mise tools
mise upgrade
# Update package managers
# macOS
brew update && brew upgrade
# Arch
sudo pacman -Syu
# Debian/Ubuntu
sudo apt update && sudo apt upgrade
# Windows
winget upgrade --all# Pull latest changes
chezmoi update
# Of handmatig
chezmoi cd
git pull
exit
chezmoi applydocker run -it --rm ubuntu:22.04 bash
apt update && apt install -y curl git
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply <your-username>/dotfilesUse a tool like UTM or Parallels to create a clean macOS VM.
Use Hyper-V or VirtualBox to create a clean Windows VM.
MIT License - Voel je vrij om te gebruiken en aan te passen!
Pull requests zijn welkom! Voor grote wijzigingen, open eerst een issue om te bespreken wat je wilt veranderen.
Gemaakt met β€οΈ voor cross-platform development