Add your GitHub token to your $HOME/.netrc file.
echo "machine github.com login <username> password <token>" >> $HOME/.netrcThen install the chezmoi dotfile manager and init it with this repository:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply git@github.com:$GITHUB_USERNAME/dotfiles.gitAdd the following to the $HOME/.config/chezmoi/chezmoi.toml file:
[data]
name = "Jon Doe"
email = "jon.doe@example.org"
gh_user = "jondoe47"
workspaces = "/home/jon/workspaces"
editor = "nvim"Some apps store config in a different path per OS (VS Code: ~/.config/Code/User on
Linux, ~/Library/Application Support/Code/User on macOS). To avoid duplicating
content, shared file content lives in .chezmoitemplates/, and each OS-specific
target path is a thin .tmpl file that includes it:
{{- template "vscode-settings.json.tmpl" -}}.chezmoiignore then excludes whichever OS tree doesn't match .chezmoi.os, so
only one copy is ever applied on a given machine. To edit the shared content,
change the file in .chezmoitemplates/, not the per-OS .tmpl stubs.
Docs: .chezmoiignore,
.chezmoitemplates,
templating.