Decisions
ADR-005: Chezmoi as Dotfiles Manager
Status: Accepted Date: 2026-02-09 Authors: @sebastienrousseau
Context
Managing dotfiles across multiple machines requires:
- Version control for configuration files
- Template support for machine-specific values
- Cross-platform compatibility (macOS, Linux, WSL)
- Encrypted secrets management
- Easy installation and updates
Several approaches were considered for dotfiles management.
Decision
Use chezmoi as the primary dotfiles management tool.
Alternatives Considered
| Tool | Pros | Cons |
|---|---|---|
| GNU Stow | Simple, no dependencies | No templating, symlink-only |
| yadm | Git-based, encryption | Limited templating |
| Bare Git | Simple, no tools | No templating, manual management |
| Ansible | Powerful, idempotent | Heavy, complex for dotfiles |
| Nix Home Manager | Declarative, reproducible | Steep learning curve, Nix dependency |
Why Chezmoi
- Template Support: Go text/template for machine-specific configuration
- Encryption: Built-in age/gpg encryption for secrets
- Cross-Platform: Native support for macOS, Linux, Windows
- Single Binary: No runtime dependencies
- Git Integration: Works with any Git host
- Dry-Run: Preview changes before applying
- Active Development: Well-maintained with responsive maintainer
Implementation
# Installation
# Initialize from repository
# Apply configuration
Template Example
# macOS-specific configuration
# Linux-specific configuration
Consequences
Positive
- Consistent configuration across all machines
- Secure secrets management with age encryption
- Easy to add new machines to the fleet
- Template-driven configuration reduces duplication
- Built-in diff and dry-run for safe updates
Negative
- Learning curve for Go templates
- Additional abstraction layer over raw Git
- Requires chezmoi binary installation
- Some features (scripts) require careful ordering
Neutral
- Configuration stored in
~/.local/share/chezmoiby default - Custom wrapper CLI (
dot) provides simpler interface - Regular
gitcommands still work in source directory