This dotfiles repository is configured and managed by the chezmoi
project. chezmoi, pronounced /ʃeɪ mwa/ (shay-moi) is currently the most complete and most hackable dotfiles manager out there.
The following instruction clones dotfiles repository into the ~/.local/share/chezmoi/
directory and next applies changes accordingly, to your home directory ~/
. During the setup it prompts you to provide configuration options like Git committer name and email address, etc.
bash -c "$(curl -fsLS get.chezmoi.io)" -- init --apply "make-ops-tools"
sequenceDiagram
autonumber
participant home directory
participant working copy
participant local repo
participant remote repo
Note over home directory: archive current files
remote repo->>local repo: chezmoi init --apply <repo>
Note left of local repo: prompt for configuration
local repo->>home directory: chezmoi init --apply <repo>
If you decide to extend the configuration of your dotfiles and include an additional file to be managed, here is an example on how to do that
chezmoi add ~/.bashrc
chezmoi edit ~/.bashrc
chezmoi diff
chezmoi apply -v
chezmoi cd
git add .
git commit -S -m "Add .bashrc"
git push
exit
sequenceDiagram
participant home directory
participant working copy
participant local repo
participant your remote repo
home directory->>local repo: chezmoi init
home directory->>working copy: chezmoi add <file>
working copy->>working copy: chezmoi edit <file>
working copy-->>home directory: chezmoi diff
working copy->>home directory: chezmoi apply
home directory-->>working copy: chezmoi cd
working copy->>local repo: git add
working copy->>local repo: git commit
local repo->>local repo: git remote add origin<br/>git branch
local repo->>your remote repo: git push
working copy-->>home directory: exit
chezmoi cd
pwd # should be ~/.local/share/chezmoi
chezmoi apply --init
chezmoi data | jq
cat ~/.config/chezmoi/chezmoi.toml
chezmoi execute-template '{{ (bitwarden "item" "dotfiles").identity.firstName }} {{ (bitwarden "item" "dotfiles").identity.lastName }}'