Skip to content

chezmoi

  • 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)
  • Author's dotfiles
  • State/git dir: ~/.local/share/chezmoi

Install

Arch / Manjaro:

sudo pacman -S chezmoi

With mise:

mise use -g chezmoi

Config

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:

chezmoi status
chezmoi diff
chezmoi apply

Templates

Secrets

Use rbw:

oauthClientId = {{ (rbw "git-credential-oauth-id").data.password }}