chezmoi¶
- Varac's dotfiles repo, based on Chezmoi
-
- "Manage your dotfiles across multiple diverse machines, securely."
- Go
- Solves the problem of different contents of config files for different devices, and supports encryption for sensitive data (like shikane display serials, snippets)
- State/git dir:
~/.local/share/chezmoi
Install¶
Arch / Manjaro:
With mise:
Config¶
- Configuration file:
~/.config/chezmoi/chezmoi.yaml
Usage¶
New machine¶
Clone dotfiles repo:
chezmoi init https://0xacab.org/varac-projects/dotfiles.git
# or: chezmoi init git@0xacab.org:varac-projects/dotfiles.git
Chezmoi needs to get configured with
template user data.
Edit ~/.config/chezmoi/chezmoi.yaml and add all templata data variables which
chezmoi needs. Copy and paste from extisting machine.
For secrets templating, rbw needs to be configured first:
chezmoi execute-template < ~/.local/share/chezmoi/home/dot_config/rbw/config.json.tmpl > ~/.config/rbw/config.json
rbw sync
rbw list
Now chezmoi is ready to populate yout dotfiles:
Templates¶
Secrets¶
Use rbw:
Encryption¶
- Docs: Encryption
- Docs: Age
- Beware: Filenames are not encrypted !
Setup:
Add this to ~/.config/chezmoi/chezmoi.yaml:
Manually distribute ~/.config/chezmoi/age-private.key across all devices that access chezmoi.
Then add encrypted files with:
Issues¶
- Remove files that are no longer in the source directory?
- No possible, see answer
- Files to be removed need to get listed in a .chezmoiremove file