Troubleshooting¶
Quick checks for common issues.
Install and update¶
Problem: Install script fails immediately
- Verify that
gitandcurlare installed. - Check internet connectivity.
- Try running with verbose output:
bash -x install.sh
Problem: Chezmoi apply fails
- Re-run
chezmoi applyto re-sync state. - Check for merge conflicts:
chezmoi diff - If hooks fail, check
~/.local/share/dotfiles.logfor details. - For non-interactive sessions, force apply to avoid TTY prompts:
DOTFILES_NONINTERACTIVE=1 dot apply --force
Problem: Packages fail to install
- macOS: Verify Homebrew is installed and up to date (
brew update) - Linux: Run
sudo apt-get updatefirst - Verify you have sufficient permissions
Shell startup¶
Problem: Shell is slow to start
- Run
dot benchmarkto measure startup time - Profile with
zsh -xto trace startup - Check for slow plugins or large history files
Problem: Aliases or functions not available
- Run
chezmoi applyto regenerate config files - Source your shell config:
source ~/.zshrc - Verify the relevant tool is installed
Problem: dot doctor prints a directory listing instead of diagnostics
- This usually means
dotwas shadowed by a navigation alias in the current shell session. - Check resolution:
type -a dot - Fix current session:
unalias dot 2>/dev/null || true && exec zsh - Validate after reload:
dot doctor
Problem: Zsh reports it cannot write .zwc files
- Cause: stale read-only zsh cache files after an upgrade.
- Remove stale caches:
find ~/.config/shell ~/.config/zsh -type f -name '*.zwc' -delete- Reload shell:
exec zsh - Re-run health checks:
dot doctor
Problem: Shell crashes on startup
- Temporarily move
~/.zshrcand retry to isolate the fault - Check for syntax errors:
zsh -n ~/.zshrc - Review recent changes:
chezmoi diff
Secrets and encryption¶
Problem: Encrypted files fail to decrypt
- Confirm
~/.config/chezmoi/key.txtexists. - Verify the key matches the one used for encryption.
- Re-initialize with
dot secrets-initif needed.
Problem: Age encryption not working
- Verify
ageis installed:command -v age - Check key permissions:
ls -la ~/.config/chezmoi/key.txt(should be 600)
Neovim¶
Problem: Plugins fail to load
- Run
:checkhealthin Neovim - Update plugins:
:Lazy sync - Check for missing dependencies (node, python, etc.)
Problem: LSP not working
- Install required language servers
- Check
:LspInfofor status - Review
:LspLogfor errors
Git¶
Problem: Git aliases not working
- Check if Git config is applied:
git config --list - Re-apply dotfiles:
chezmoi apply
Problem: Delta (diff pager) not showing colors
- Verify
deltais installed - Confirm your terminal supports 256 colors
Kubernetes tools¶
Problem: kubectl context issues
- List contexts:
kubectl config get-contexts - Switch context:
kubectx <context-name> - Check kubeconfig:
echo $KUBECONFIG
Problem: Minikube won't start
- Verify Docker is running
- Try:
minikube delete && minikube start - Check logs:
minikube logs
Performance¶
Problem: High memory usage
- Look for runaway processes:
htoporbtop - Review shell history size in atuin config
- Disable unused plugins
Common infrastructure failures¶
Problem: Nix isn't installed or commands not found
- Ensure you have followed the installation guide:
curl -L https://nixos.org/nix/install | sh - On Linux, you might need to enable experimental features in
~/.config/nix/nix.conf:experimental-features = nix-command flakes - Verify the daemon is running:
ps aux | grep nix-daemon
Problem: Systemd isn't available (mostly WSL2)
- Dotfiles functions that rely on systemd (like
pueuemanagement) will fallback to direct execution. - To enable systemd in WSL2, add this to
/etc/wsl.conf(requires Windows 11 or latest WSL):
- Restart WSL:
wsl.exe --shutdown
Problem: GPG or SSH signing fails
- Check if your key is present:
gpg --list-secret-keysorssh-add -l - Ensure
GPG_TTYis set (dotfiles does this automatically inrc.d). - For hardware keys (Yubikey), ensure
pcscdis running on Linux.
Advanced Troubleshooting¶
WSL2 and Nix Integration Issues¶
For complex WSL2 edge cases, Nix integration problems, and recovery procedures, see the comprehensive guide: WSL2 & Nix Troubleshooting Guide
This guide covers:
- WSL2 filesystem and networking edge cases
- Nix installation and flake management issues
- Complete system recovery procedures
- Performance optimization for WSL2/Nix environments
- Cross-platform migration scenarios
Still stuck¶
Open an issue with:
- OS + version
- Output of
dot doctor(if available) - Relevant log snippets from
~/.local/share/dotfiles.log - Steps to reproduce the issue
- For WSL2/Nix issues: Include diagnostic report from the advanced guide