Closed leonfeng closed 1 year ago
Chezmoi cannot manage its own configuration file. This is a deliberate change recently added (#2822) because Bad Things Happen® if you try to do this (#2674, #2820; I’m sure there are others).
You can add a .chezmoi.toml.tmpl
to your source directory which will be used when generating a machine-specific entry. If there are secrets with those, you will want to either prompt for them (using init prompt functions as documented) or pull them from a pre-configured secret source (still using templates, but no prompts).
Got it! Thank you for the detailed explanation 😃
What exactly are you trying to do?
Push the changes made in
chezmoi.toml
after setting up GPG encryption. But the command fails with the error message:What have you tried so far?
I generated a GPG key pair following GitHub's guide, and configured chezmoi to use GPG following the User Guide.
Afterwards, I was able to
chezmoi add --encrypt ~/.wget-hsts
andchezmoi add ~/.gitconfig
without issue, but wasn't able tochezmoi add ~/.config/chezmoi/chezmoi.toml
.Where else have you checked for solutions?
Output of any commands you've tried with
--verbose
flagOutput of
chezmoi doctor
Additional context
Here is my
chezmoi.toml
: