DEV Community

Discussion on: A Brief Guide To Manage Dotfiles

Collapse
 
cyberjack profile image
CyberJack

It can do more than described in this post.

For me, one of the biggest wins is personalisation. You can use the same configuration across multiple machines, while still being able to control machine-specific details. Chezmoi can use templates (using the go text/template syntax), which allows you to personalise dotfiles based on the operating system, architecture, and hostname. So, for example, you can use the same global .gitconfig file privately and at work and use a different username and email address on each machine, while still using a single dotfile repository.

It also supports secrets, which can be retrieved from one of the many password managers it supports, and it also supports full-file encryption using GPG, age or any other tool you prefer.

On top of that, it supports dry-runs, so you can see the differences before overwriting any existing configuration.