Skip to content

joaofelipegalvao/dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Dotfiles managed with Chezmoi + Bitwarden

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.

Prerequisites

  • Chezmoi installed
  • Bitwarden CLI (bw) configured and logged in

Installation

You can fork this project to create your own set of configurations.
After that, install Chezmoi and initialize it like this:

$ chezmoi init --apply joaofelipegalvao

During initialization, you'll be prompted for information that will be saved in:

$ cat ~/.config/chezmoi/chezmoi.toml

All tracked templates and files are located here:

$ ls ~/.local/share/chezmoi

The 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

Editing your templates

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 editor

Adding new dotfiles

If you create a new configuration file — for example, you started using Tmux or Yazi — add it like this:

$ chezmoi add --autotemplate ~/.config/yazi/yazi.toml

The --autotemplate flag makes Chezmoi automatically identify parts that should become template variables.

Working with sensitive data (Bitwarden)

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 data

Updating your environment

Whenever you change a template or data file:

$ chezmoi apply

To pull updates from the remote repository:

$ chezmoi update

Saving changes to the repository

After updating your dotfiles:

$ chezmoi cd
$ git add .
$ git commit -m "Update dotfiles"
$ git push

Repository structure

dot_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.

About

Repository containing my configuration files managed with Chezmoi and Bitwarden.

About

☕️ My Dot Files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors