chezmoi/External
Properties
- tags
- chezmoi/Docs
chezmoi External Files
- chezmoi can manage files that come from external sources (git repos, archives, single files) via
.chezmoiexternal.tomlfiles git-repo type
- Clones a git repo to a target directory and keeps it updated
- Declared in a
.chezmoiexternal.tomlfile placed in the parent of the desired target directory in the chezmoi source - toml
["<dirname>"] type = "git-repo" url = "https://github.com/user/repo.git" refreshPeriod = "168h" refreshPeriodcontrols how oftenchezmoi updaterunsgit fetch—"168h"= weekly- To pin to a specific commit or tag, add
exact = trueandref = "<tag-or-sha>"
Usage in this dotfiles repo
- oh-my-tmux is managed this way
- Source:
chezmoi/dot_local/share/tmux/.chezmoiexternal.toml - Clones to:
~/.local/share/oh-my-tmux/ - See oh-my-tmux/Installation for the full setup
- Source:
- oh-my-tmux is managed this way
Chezmoi symlinks
- Use a
symlink_<name>file in the chezmoi source to create a symlink at the target path - File contents = the symlink target (can be relative or absolute)
- Example:
chezmoi/dot_config/tmux/symlink_tmux.confcontaining../../.local/share/oh-my-tmux/.tmux.confcreates
~/.config/tmux/tmux.conf → ../../.local/share/oh-my-tmux/.tmux.conf
- Use a
- chezmoi can manage files that come from external sources (git repos, archives, single files) via