This is a personal dotfiles repository managed with chezmoi. It contains configuration files for various development tools including Git, Fish shell, SSH, Docker, and development environments.
./scripts/install-dotfiles.sh- Standard installation script; prompts for identity interactively./install.sh [--identity personal|journalytic|kirbtech]- Dev container install with auto-detected or explicit identity
./render.sh [--identity IDENTITY] [--dc] [--codespaces] <template-file>- Renders chezmoi templates to stdout for testing. Drives the real.chezmoi.toml.tmplvia env overrides so output matches a live apply
- All configuration files are in
root/directory as chezmoi templates (.tmplextension) .chezmoi.toml.tmpldefines data variables and environment detection- Templates use Go template syntax with conditional logic for different environments
The dotfiles adapt based on environment variables:
REMOTE_CONTAINERS_IPC- Detects dev container environmentCODESPACES- Detects GitHub Codespaces environmentDOTFILES_SOURCE_DIR- Override source directory (defaults to current directory for install.sh)
The identity data variable drives work-specific configuration. It is set once via promptStringOnce during chezmoi init and stored in the local chezmoi config.
Valid values: personal, journalytic, kirbtech
- personal — no work context; no
.gitconfig-workincluded - journalytic — uses
carson@journalytic.comas work email - kirbtech — uses
carson.seese@kirbtech.comas work email
On non-DC machines with a work identity, .gitconfig-work is included only for repos under ~/dev/work/ (via includeIf). On dev containers, it is included unconditionally.
Install script usage:
./install.sh --identity kirbtech # explicit
./install.sh # auto-detect from repo org; else prompt (TTY)install.sh resolves identity in this order: explicit --identity flag → auto-detection from the repo org (GITHUB_REPOSITORY / workspace remote, work orgs only) → interactive select prompt when stdin is a TTY → error requiring --identity when non-interactive (cloud-init, CI, dev container hooks).
Commits are signed with an SSH key. The signing public key resolves at chezmoi init time with this precedence: DOTFILES_SIGNING_KEY env var → ~/.ssh/git_signing.pub (per-host override) → a committed canonical default. Because the public key is non-secret and always available, signing works out of the box on every machine — including dev containers, which sign using the host's forwarded SSH agent (no local key file needed).
The gitSign data flag gates all signing config (dot_gitconfig.tmpl, allowed_signers.tmpl). It is true everywhere except Codespaces, where GitHub signs commits server-side with its own web-flow key and the forwarded signing key is unavailable. The matching private key must be loaded in the SSH agent wherever commits are made.
On real hosts (WSL, VMs, bare metal), install.sh runs scripts/generate-signing-key.sh to create a per-host ~/.ssh/git_signing key before applying. When that private key file is present, dot_gitconfig.tmpl sets signingkey to the file path (gitSigningKeyFile) and signs directly from disk with no agent; otherwise it falls back to the key:: public-key literal and the forwarded agent.
CLI tools are managed by mise via root/private_dot_config/mise/config.toml.tmpl. Language SDKs (go, node, bun) are conditionally included only outside dev containers (not .isDc). Tools are installed automatically during chezmoi apply via the run_onchange_after_01-mise-install.sh.tmpl script.
Post-install scripts in root/.chezmoiscripts/ run automatically during chezmoi apply:
run_onchange_after_01-mise-install.sh.tmpl- Installs mise tools when config changesrun_after_install-claude-config.sh.tmpl- Syncs Claude Code configurationrun_onchange_after_02-install-completions.sh.tmpl- Generates fish completions forghanddocker
Simple key-value environment variables (e.g., VISUAL, HOMEBREW_NO_AUTO_UPDATE) are centralized in template partials under root/.chezmoitemplates/. Each partial renders the same variables in the syntax for its target shell:
| Partial | Syntax | Consumed by |
|---|---|---|
env-posix |
export VAR=val |
dot_bashrc.tmpl, dot_zshrc.tmpl |
env-fish |
set -gx VAR val |
config.fish.tmpl |
env-powershell |
$env:VAR = "val" |
Microsoft.PowerShell_profile.ps1.tmpl |
env-windows-persist |
[Environment]::SetEnvironmentVariable(...) |
run_onchange_after_03-windows-env.ps1.tmpl |
To add a new env var: Add one line in the appropriate syntax to each partial that should receive it. Use chezmoi template guards (e.g., {{ if .isMac }}) for conditional vars. Not all vars need to appear in every partial — add only to the shells/platforms where the var applies.
Complex setup (PATH manipulation, brew shellenv, tool activations like mise/starship/zoxide, SSH agent) belongs in each shell's own config file or conf.d/ files — not in the centralized partials.
On Windows, run_onchange_after_03-windows-env.ps1.tmpl persists env vars from env-windows-persist to the User registry via [Environment]::SetEnvironmentVariable(). It re-runs automatically when the partial's content changes.
root/.chezmoiexternal.toml.tmpl- Pulls external dependencies (fundle, eget binaries)root/.chezmoiignore.tmpl- Controls which files chezmoi ignores per environment
root/.chezmoi.toml.tmpl- Main chezmoi configuration with environment variablesroot/dot_gitconfig.tmpl- Git configuration with conditional work includesroot/dot_gitconfig-work.tmpl- Work-specific git configurationroot/private_dot_config/fish/config.fish.tmpl- Fish shell configurationroot/dot_bashrc.tmpl- Bash configuration (Homebrew, starship, mise, zoxide, mcfly)root/dot_zshrc.tmpl- Zsh configuration
# Install dotfiles
./scripts/install-dotfiles.sh
# Install tools + dotfiles in dev container
./install.sh
# Test template rendering
./render.sh root/dot_gitconfig.tmpl
# Manual chezmoi operations (after install)
chezmoi diff # Show pending changes
chezmoi apply # Apply changes
chezmoi status # Show status-
Changes must be extremely thoughtful - Ensure any modification is thoroughly tested and validated before considering it final. No mistakes are acceptable.
-
Keep changes simple and maintainable - If a change grows in complexity, ask for feedback/instruction or suggest ways to refine the scope to remain simple and maintainable.
-
Documentation maintenance - Regularly check and update documentation (including AGENTS.md) for stale content when patterns or configurations change.
-
Template formatting - Template files containing Go template strings must be formatted carefully to preserve correct whitespace and avoid trimming issues.
-
NEVER test on host machine - Changes must never be tested on the host machine.
chezmoi applyshould be considered dangerous unless run within a Docker container.