Reference
Reference: Environment Variables
All environment variables that affect .dotfiles behaviour.
User-Settable
Variables you can set in your shell to change behaviour.
| Variable | Default | Effect |
|---|---|---|
DOTFILES_NONINTERACTIVE | unset | Skip interactive prompts (for CI) |
DOTFILES_YES | unset | 1 answers yes to dot system update and dot ai install questions (installing mise, AI tools, upgrading system packages); same as --yes. Without it and without a terminal, those commands install nothing extra |
DOTFILES_SILENT | unset | install.sh and its provisioning steps: suppress non-error output (same as install.sh --silent) |
DOTFILES_INTERACTIVE_APPLY | unset | 1 brings back chezmoi's overwrite prompts during dot apply (it runs with --force otherwise) |
DOTFILES_PACKAGES_TIMEOUT | 10 | Seconds each dot tool list --packages query may take before it is reported as timed out |
DOTFILES_APP_STORES | 1 | 0 skips the App Store (mas), Flatpak and Snap phase of dot system update, shown as a skip, on a machine whose store CLI is installed but does not work |
DOTFILES_DEBUG | unset | Print zsh-init timing to stderr |
DOTFILES_TRACE | unset | Full zsh-init trace to stderr |
DOTFILES_WALLPAPER_DIR | ~/Pictures/Wallpapers | Custom wallpaper directory |
DOTFILES_FLEET_HOSTS | ~/.config/dotfiles/fleet.toml | Host list for dot fleet apply |
DOTFILES_REGISTRY_URL | unset | One-off override of the dot cli registry URL |
DOTFILES_TUNING | 0 | Enable OS tuning (dot system settings apply) |
DOT_LOG_LEVEL | info (debug with -v) | The lowest level written to the log.v1 logs, $XDG_STATE_HOME/dot/<domain>/log.jsonl: debug, info, warn or error |
DOT_LOG_RETENTION_DAYS | 30 | Days of log.v1 records the maintenance job keeps |
DOT_LOG_DOMAIN | the command's domain | Which domain's log a command writes to; bin/dot sets it, and a plugin's DOT_DOMAIN stands in when it is unset |
DOT_LOCK_WAIT | 0 | Seconds a write or destructive command waits for another dot command in the same domain to release its lock before exiting 75 (ADR-020 N17) |
DOT_ALLOW_PATH_PLUGINS | unset | 1 lets a word dot does not know run ~/.config/dotfiles/commands/<word>.sh, or dot-<word> beside bin/dot or on PATH, with a deprecation warning. Off, dot names the file and the word is unknown (exit 127). Deprecated: user plugins come with the signed trust path (ADR-016) |
EDITOR | nvim | Editor used by dot edit and sops |
PAGER | less | Pager used by dot help --manual text |
dot finds its source directory from its own install location, then CHEZMOI_SOURCE_DIR, then ~/.dotfiles, then ~/.local/share/chezmoi; there is no DOTFILES_SOURCE_DIR override for it (install.sh sets that variable only for its own provisioning scripts). State and cache paths follow XDG_STATE_HOME and XDG_CACHE_HOME.
Auto-Populated
Variables the dotfiles set in your shell for tool consumption.
| Variable | Value | Source |
|---|---|---|
XDG_CONFIG_HOME | ~/.config | dot_zshenv (zsh) |
XDG_CACHE_HOME | ~/.cache | ditto |
XDG_DATA_HOME | ~/.local/share | ditto |
XDG_STATE_HOME | ~/.local/state | ditto |
PATH | managed order | dot_config/shell/00-core-paths.sh.tmpl |
DOTFILES_DIR | the dotfiles checkout: ~/.dotfiles, or wherever install.sh's SOURCE_DIR put it (chezmoi's working tree) | 00-core-paths.sh.tmpl (bash, zsh), env.fish.tmpl (fish); a value already set wins. The aliases, functions and scripts that run files from the checkout read it, and fall back to ~/.dotfiles |
BUN_INSTALL | ~/.bun | env.fish.tmpl |
PIPX_HOME | ~/.local/share/pipx | ditto |
PIPX_BIN_DIR | ~/.local/bin | ditto |
DOT_BUILD_ROOT | ~/.cache/dot/builds (under XDG_CACHE_HOME) | mise [env], rc.d/35-rust-target.zsh.tmpl, env.fish.tmpl |
GOCACHE | $DOT_BUILD_ROOT/go-cache | mise [env] |
PIP_CACHE_DIR | $DOT_BUILD_ROOT/pip-cache | mise [env] |
UV_CACHE_DIR | $DOT_BUILD_ROOT/uv-cache | mise [env] |
ZIG_LOCAL_CACHE_DIR | $DOT_BUILD_ROOT/zig-cache | mise [env] |
ZIG_GLOBAL_CACHE_DIR | $DOT_BUILD_ROOT/zig-global-cache | mise [env] |
HOMEBREW_PREFIX | /opt/homebrew, /usr/local or /home/linuxbrew/.linuxbrew | dot_zprofile (when Homebrew is installed) |
MANPATH | homebrew-adjusted | ditto |
MISE_EXPERIMENTAL | 1 | ~/.config/mise/conf.d/00-dotfiles.toml |
mise [env] is ~/.config/mise/conf.d/00-dotfiles.toml. The dotfiles set no CARGO_TARGET_DIR (each project keeps its own ./target) and no GOTMPDIR (Go uses the system temporary directory).
No GitHub token is exported. Every process mise launches inherits its [env], so a token there would reach untrusted build and test commands. mise authenticates its own GitHub API calls with github.credential_command = "gh auth token" under [settings], and other tools call gh themselves.
Read by Tools
Variables set by upstream tools and respected by .dotfiles.
| Variable | Used for |
|---|---|
SHELL | Detect default shell |
TERM | Terminal capabilities (e.g. xterm-256color) |
COLORTERM | True-color detection (truecolor) |
LANG / LC_ALL | Locale (must be UTF-8) |
HOME | User home directory |
USER | Username |
SSH_AUTH_SOCK | ssh-agent socket |
GPG_TTY | GPG pinentry TTY |
CI-Specific
Variables relevant in GitHub Actions.
| Variable | Purpose |
|---|---|
CI | Set to true in CI; disables prompts, and questions that would install software are answered no |
GITHUB_ACTIONS | GHA-specific; enables step summary output |
CHEZMOI_VERSION | Pinned chezmoi version for CI |
COVERAGE_THRESHOLD | Module-mapping threshold for tests/framework/coverage_analyzer.sh (default 100; not line coverage) |
Secret-Related
| Variable | Purpose |
|---|---|
SOPS_AGE_KEY_FILE | Override the ~/.config/sops/age/keys.txt path sops reads |
SOPS_AGE_RECIPIENTS | Override recipients for new encryption |
CHEZMOI_AGE_IDENTITY | Age identity written into chezmoi.toml by a non-interactive chezmoi init (default ~/.config/chezmoi/key.txt) |
CHEZMOI_AGE_RECIPIENT | Age recipient for a non-interactive chezmoi init |
Warning: never set these to values stored in plaintext config. Use a password manager or ephemeral injection.
Startup Order
Shell-loaded variables follow this precedence (later wins):
- System defaults (
/etc/environment,/etc/profile) - Homebrew shellenv (macOS)
~/.zshenv(earliest user-level file; sets XDG + PATH bootstrap)~/.zprofileor~/.config/fish/conf.d/*.fish~/.zshrcor~/.config/fish/config.fishmise activate— injects tool-specific env- Per-project
.envrcvia direnv (opt-in)
To debug: DOTFILES_DEBUG=1 zsh -i -c exit prints timing for each stage.
Unsetting
To clean up environment pollution:
# Show current dotfiles-set vars
|
# Unset one
# Reset to defaults (restart shell)