Skip to content
krahlosPublic

About

my dotfiles managed with chezmoi

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

krahlos dotfiles

Prerequisites

Add your GitHub token to your $HOME/.netrc file.

echo "machine github.com login <username> password <token>" >> $HOME/.netrc

Installation

Then 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.git

Configuration

Add 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"

Cross-platform app configs (e.g. VS Code)

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.

About

my dotfiles managed with chezmoi

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages