Skip to content

Runtime paths and platform isolation

Every installer sources install/_lib.sh, which derives runtime paths from LOCAL_PLAT. In the ordinary flat layout that is ~/.local; with DF_USE_PLAT=1, it is ~/.local/$PLAT. The latter is for one NFS-shared home used from machines with incompatible architectures, not a general performance setting.

VariablePurpose
ARCH_BINexecutable destination: $LOCAL_PLAT/bin
CARGO_HOME, RUSTUP_HOMERust tools and toolchains
NVM_DIRNode versions and global npm package tree
UV_TOOL_DIR, PYTHON_ENVuv tool environments and managed Python
ELAN_HOMELean toolchains and shims
GOPATH, GOCACHE, GOBINGo source/cache and executable destination

The exact derivations are in _lib.sh. Platform detection chooses the highest matching install/plat/ specification; the lightweight runtime helper resolves ~/.local through a scratch symlink before adding the optional platform directory (source).

Terminal window
# Normal single-machine layout
./bootstrap.sh
# Only for an NFS-shared HOME across architectures
DF_USE_PLAT=1 ./bootstrap.sh

In PLAT mode, failure to find a matching platform specification is fatal. In flat mode, detection still supplies capability flags when available but no matching specification is acceptable (source).

Generated login profiles use the same layout: they put the selected runtime bin ahead of Homebrew and export the language-specific homes (zprofile source). Confirm what the current shell actually resolves before diagnosing a tool:

Terminal window
printf '%s\n' "$DF_USE_PLAT" "${_LOCAL_PLAT:-unset}"
command -v cargo node python lean
bash ~/dotfiles/install/verify-path.sh

DF_SCRATCH can redirect large writable directories to bulk storage. The scratch installer copies, verifies entries, and only then replaces a real directory with a symlink (source). It intentionally keeps managed ~/.claude and ~/.codex directories real and moves selected unmanaged Claude subdirectories instead (source). See PLAT setup and scratch setup before enabling either feature on a populated home.

Machine-specific inputs come from host configuration. DF_TOOLS_ROOT overrides the tool base before PLAT is appended. DF_STATE_ROOT is a separate persistent host-local root, currently consumed by Codex as CODEX_HOME=$DF_STATE_ROOT/codex. Tools can be shared by compatible machines; WAL databases, locks, and daemon sockets cannot.