twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
13.36k stars 493 forks source link

"Template" version of Chezmoi config file which gets synced #3567

Closed J-Kappes closed 8 months ago

J-Kappes commented 8 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when I set up a new machine and the config entries I'm missing pop up one by one.

Describe the solution you'd like

I would prefer it if calling chezmoi edit-config on a new machine copied a "template" version of my config into the expected location and then opened that file. This "template" version is a hidden file at the base of my chezmoi directory .config.<format> which is a copy of my config but with all its values set to an empty string. Perhaps a chezmoi sync-config command generates this file from the config currently in use.

This way, I immediately have an overview of which values I might need to set in the near future or can even set them all right then and there.

Describe alternatives you've considered

I've tried adding my config to chezmoi. It wasn't allowed.

twpayne commented 8 months ago

https://www.chezmoi.io/user-guide/setup/#create-a-config-file-on-a-new-machine-automatically ?

bradenhilton commented 8 months ago

@twpayne https://www.chezmoi.io/reference/configuration-file/ mentions the path that chezmoi reads its config from, but does not mention that this file/path can't or shouldn't be added to the source state, and makes no mention of the config template.

Do you think a quality pass is in order for this and anywhere else the .config/... path is mentioned? I'll look for more examples...

twpayne commented 8 months ago

Do you think a quality pass is in order for this and anywhere else the .config/... path is mentioned? I'll look for more examples...

Yes please! Quality passes are fantastic.

twpayne commented 8 months ago

In the short term, I'll close this issue as resolved. Please re-open if needed.