Skip to content

Configuration ​

naspeed reads ~/.config/naspeed/config.toml, which setup creates:

toml
stores = ["/Volumes/Work/.naspeed"]
slots = 8
min_free_mem_mb = 1536
store_cap_gb = 20
store_max_age_days = 14
min_free_disk_pct = 10   # below this share of free space on the store's volume, misses are not stored
build_script_cache = true
workspace_cache = true
workspace_cache_max_entry_mb = 256  # workspace crates with bigger outputs are compiled but not stored (0: no limit)
cow_mode = "auto"   # auto | copy | hardlink (hardlink: opt-in, objects stay read-only)
warm_incremental = true  # rebuild incremental state of restored workspace crates in the background
remotes = []        # peer stores, e.g. ["http://desktop.tailnet-name.ts.net:7878"]
remote_token_file = "~/.config/naspeed/remote.token"

Project-level settings for ns live in ns.toml.

Environment variables ​

These override the file:

VariableEffect
NASPEED_STOREUse this store
NASPEED_SLOTSNumber of slots
NASPEED_MIN_FREE_MEM_MBMemory threshold
NASPEED_COW_MODECopy mode
NASPEED_CONFIG_DIRConfig directory
NASPEED_DISABLE=1Pass every call through
NASPEED_BUILD_SCRIPT_CACHE=0Run build scripts uncached
NASPEED_WORKSPACE_CACHE=0Do not cache workspace crates
NASPEED_WORKSPACE_CACHE_MAX_ENTRY_MBSize limit for a stored workspace crate (0: none)
NASPEED_MIN_FREE_DISK_PCTFree-space floor for storing misses (0: off)
NASPEED_NO_AUTO_GC=1No background trim (daily, or every 30 min below the free-space floor)
NASPEED_WARM_INCREMENTAL=0No background incremental warm-up after a hit
NASPEED_REMOTES=url,urlPeer stores for this shell (empty: none)
NASPEED_REMOTE_TOKENToken for peers and serve
NASPEED_REMOTE_CONNECT_MSConnect timeout per peer (default 800)
NASPEED_LOG=naspeed=debugTurn on logging
NO_COLOR=1Plain log lines, no colors
CLICOLOR_FORCE=1Colored log lines even when stderr is not a terminal (GitHub Actions is colored by default)
NASPEED_UI_INDENT=<n>Start log lines n levels deep, so a wrapper's own steps can nest naspeed's (naspeed-action sets it)

Command output is a tree of log lines on stderr: • step at the top, nested • detail lines, key=value fields in one column and • took: 12s under slow steps. Program output stays on stdout: test binaries, naspeed stats --json, the image digest of ns image. | NASPEED_LOG_FILE=<path> | Write logs to this file |

NASPEED_DISABLE=1 affects only later builds; see Limits.

Apache-2.0 licensed.