Skip to content
Configuration & environment variables

Configuration & environment variables

config.yaml

nem reads global settings from ~/.nem/config.yaml (or $NEM_HOME/config.yaml):

catalogs:
  - name: myteam
    type: oci
    oci:
      ref: ghcr.io/myorg/catalog:v1
sandbox: true
build-timeout: 5m
use-official-catalog: true
auth:
  github:
    token: '{{ env "GITHUB_TOKEN" }}'
FieldTypeDescription
catalogslistExplicit package catalogs, in lookup order. Managed with nem catalog. The official catalog is always appended last and is not stored here.
sandboxboolWhether source builds run in a sandbox. Defaults to true; overridden by NEM_SANDBOX.
build-timeoutstringTime limit for a package’s build, install, and test steps, as a Go duration (5m, 90s). Defaults to 5m; overridden by NEM_BUILD_TIMEOUT.
use-official-catalogboolWhether the official catalog (ghcr.io/vi-dev/nem-catalog:v1) is enabled. Defaults to true; overridden by NEM_USE_OFFICIAL_CATALOG. The name official is reserved — adding a catalog entry with that name causes a hard failure at load.
authmapCredentials for private catalogs and artifacts. See Authentication.

Each catalog entry has a name, a type, and a type-specific block:

TypeBlockFields
gitgit:remote, optional ref
local-dirlocal-dir:path
ocioci:ref, optional artifacts (upstream, registry, or prefer-registry; defaults to upstream; overridden by NEM_OCI_ARTIFACTS) — see Artifact source

Environment variables

VariableDescription
NEM_HOMERoot directory for nem’s state — config, installed packages, and catalogs. Defaults to ~/.nem.
NEM_SANDBOXSet to 0 to disable the build sandbox (overrides sandbox).
NEM_BUILD_TIMEOUTOverrides build-timeout with a Go duration (e.g. 5m, 90s).
NEM_USE_OFFICIAL_CATALOGSet to 0 to disable the official catalog (overrides use-official-catalog).
NEM_OCI_ARTIFACTSOverrides the artifacts mode for every OCI catalog, including official (upstream, registry, or prefer-registry).

For the on-disk layout under NEM_HOME, see How nem works.