Skip to content

Repository files navigation

dotfiles

My macOS and Linux shell and application configuration files, managed with Chezmoi.

Get started

Install Chezmoi with a package manager, then run:

git clone https://github.com/matheuseabra/dotfiles.git ~/dotfiles
chezmoi init --source="$HOME/dotfiles"
chezmoi diff
chezmoi apply

Everyday use

Edit files in ~/dotfiles, not the generated files under $HOME:

chezmoi diff
chezmoi apply
chezmoi source-path ~/.zshrc
chezmoi update

Chezmoi prefixes such as dot_, private_, and executable_ control target names and permissions. Templates (.tmpl) are rendered before they are applied.

Commits

Enable the safety hook once:

git config core.hooksPath .githooks

It checks the working tree and applies Chezmoi before each commit. A target conflict stops the commit instead of overwriting local changes.

Chezmoi also automatically stages, commits, and pushes source changes through its git.autoAdd, git.autoCommit, and git.autoPush settings. These are triggered by Chezmoi operations that change the source state, such as chezmoi add; they are not a background watcher for arbitrary edits. Check git status before running a source-mutating command because autoPush can publish all local commits currently ahead of the remote. Do not add secrets to the source repository: automatic pushes publish them immediately.

Themes

On macOS, preview or switch supported themes with:

change_theme <theme> --dry-run
change_theme <theme>

change_theme edits the live configuration files and batches their chezmoi add operations into one automatic commit and push. Use --dry-run first when you do not intend to publish a theme change immediately.

Secrets

Keep credentials, private keys, and local environment files out of Git. Use Chezmoi encryption or a password manager when a managed file needs a secret.

About

My shell and application configuration files, managed with Chezmoi.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages