Secrets management
Integrate with password managers (Bitwarden, 1Password, etc.) and manage encrypted files using age or gpg.From its SKILL.md
npx -y skills add mkobit/chezmoi-skills --skill secrets-managementAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.5 KB, as published. Nobody here has run it
When you need detailed syntax examples, full function signatures, or backend configurations, scan the references/ directory.
Approaches to secrets
chezmoi supports two strategies for secrets in dotfiles:
- Template functions — fetch secrets dynamically at apply time from a password manager or secret store.
- Encrypted files — store secrets encrypted in the source repository using
ageorgpg.
Use template functions when credentials rotate frequently or are managed centrally. Use encrypted files when credentials need to be stored directly in the repository.
Secret templates in config
Password manager functions can be used directly in chezmoi.toml.tmpl:
[data]
gitSigningKey = {{ onepasswordRead "op://vault/GPG Key/public key" | quote }}
Best practices
- Store the
ageidentity orgpgprivate key outside the source repository. - Rotate secrets in the password manager rather than modifying chezmoi templates.
- Consult password-managers.md for 1Password, Bitwarden, Vault, and KeePassXC function signatures and examples.
- Consult secret-providers.md for pass, gopass, OS keyring, generic CLI tools, and cloud secret functions.
- Consult encryption.md for
ageandgpgsetup guides and naming patterns.