Files
narOS/images/agent/files/etc/profile.d/naros-env.sh
T

27 lines
1.2 KiB
Bash
Raw Normal View History

# narOS agent-tier environment (NAROS.md §6.3), sourced by nash -l for every
# containerized exec (ContainerEngine ignores OCI image env, so this file — not the
# Dockerfile ENV — is what agent shells actually see).
#
# Warm shared caches at fixed world-readable paths. Pre-seeded at image build; the
# per-session copy-on-write rootfs clone makes them private per container.
export npm_config_cache=/opt/cache/npm
export PIP_CACHE_DIR=/opt/cache/pip
export UV_CACHE_DIR=/opt/cache/uv
export CARGO_HOME=/opt/cache/cargo
export RUSTUP_HOME=/opt/rustup
export GOMODCACHE=/opt/cache/gomod
export PLAYWRIGHT_BROWSERS_PATH=/opt/playwright-browsers
# mise (§6.3): shims-on-PATH activation — works for non-interactive `nash -lc` scripts,
# where the interactive `mise activate` hook would not run.
export MISE_DATA_DIR=/opt/mise
# Baked toolchains (§6.2): cargo/rustup bins, Go, the swift.org toolchain at
# /opt/swift/usr/bin, and the mise shims ahead of them all so `mise use` versions win
# per-project. Idempotent (guarded) — profile.d can be sourced more than once per session.
case ":$PATH:" in
*:/opt/mise/shims:*) ;;
*) PATH="/opt/mise/shims:/opt/cache/cargo/bin:/usr/local/go/bin:/opt/swift/usr/bin:$PATH" ;;
esac
export PATH