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" }}'| Field | Type | Description |
|---|---|---|
catalogs | list | Explicit package catalogs, in lookup order. Managed with nem catalog. The official catalog is always appended last and is not stored here. |
sandbox | bool | Whether source builds run in a sandbox. Defaults to true; overridden by NEM_SANDBOX. |
build-timeout | string | Time 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-catalog | bool | Whether 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. |
auth | map | Credentials for private catalogs and artifacts. See Authentication. |
Each catalog entry has a name, a type, and a type-specific block:
| Type | Block | Fields |
|---|---|---|
git | git: | remote, optional ref |
local-dir | local-dir: | path |
oci | oci: | ref, optional artifacts (upstream, registry, or prefer-registry; defaults to upstream; overridden by NEM_OCI_ARTIFACTS) — see Artifact source |
Environment variables
| Variable | Description |
|---|---|
NEM_HOME | Root directory for nem’s state — config, installed packages, and catalogs. Defaults to ~/.nem. |
NEM_SANDBOX | Set to 0 to disable the build sandbox (overrides sandbox). |
NEM_BUILD_TIMEOUT | Overrides build-timeout with a Go duration (e.g. 5m, 90s). |
NEM_USE_OFFICIAL_CATALOG | Set to 0 to disable the official catalog (overrides use-official-catalog). |
NEM_OCI_ARTIFACTS | Overrides 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.