This repository contains my configuration files (dotfiles) used in my Linux environment.
All configuration is managed by Chezmoi, with sensitive data loaded via Bitwarden CLI.
- Chezmoi installed
- Bitwarden CLI (
bw) configured and logged in
You can fork this project to create your own set of configurations.
After that, install Chezmoi and initialize it like this:
$ chezmoi init --apply joaofelipegalvaoDuring initialization, you'll be prompted for information that will be saved in:
$ cat ~/.config/chezmoi/chezmoi.tomlAll tracked templates and files are located here:
$ ls ~/.local/share/chezmoiThe idea is that Chezmoi uses templates like dot_config/git/config.tmpl, merging them with data from chezmoi.toml, ultimately generating the actual file in the correct location, such as:
~/.config/git/config
Always remember to edit the templates, never the generated files.
Chezmoi provides useful tools:
$ chezmoi cd # enters the main dotfiles directory
$ chezmoi edit ~/.zshrc # opens the corresponding template in your editorIf you create a new configuration file — for example, you started using Tmux or Yazi — add it like this:
$ chezmoi add --autotemplate ~/.config/yazi/yazi.tomlThe --autotemplate flag makes Chezmoi automatically identify parts that should become template variables.
Sensitive information that should not go to GitHub must be stored via Bitwarden.
Example template using Bitwarden CLI:
[user]
name = {{ (bitwarden "item" "Git User Name").notes }}
email = {{ (bitwarden "item" "Git User Email").notes }}To view all data being used by Chezmoi:
$ chezmoi dataWhenever you change a template or data file:
$ chezmoi applyTo pull updates from the remote repository:
$ chezmoi updateAfter updating your dotfiles:
$ chezmoi cd
$ git add .
$ git commit -m "Update dotfiles"
$ git pushdot_config/
├── git/ # Git configuration
├── mise/ # Runtime version manager
├── nvim/ # Neovim (LazyVim)
├── tmux/ # Terminal multiplexer
├── yazi/ # File manager
└── zsh/ # Shell and prompt
Each directory automatically maps to ~/.config/* when Chezmoi applies the changes.
Repository containing my configuration files managed with Chezmoi and Bitwarden.