Runtime paths and platform isolation
One path contract
Section titled “One path contract”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.
| Variable | Purpose |
|---|---|
ARCH_BIN | executable destination: $LOCAL_PLAT/bin |
CARGO_HOME, RUSTUP_HOME | Rust tools and toolchains |
NVM_DIR | Node versions and global npm package tree |
UV_TOOL_DIR, PYTHON_ENV | uv tool environments and managed Python |
ELAN_HOME | Lean toolchains and shims |
GOPATH, GOCACHE, GOBIN | Go 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).
# Normal single-machine layout./bootstrap.sh
# Only for an NFS-shared HOME across architecturesDF_USE_PLAT=1 ./bootstrap.shIn 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).
Shell and scratch convergence
Section titled “Shell and scratch convergence”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:
printf '%s\n' "$DF_USE_PLAT" "${_LOCAL_PLAT:-unset}"command -v cargo node python leanbash ~/dotfiles/install/verify-path.shDF_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.