eb-local.config

module eb-local.config  src/config.zig[source][autodoc]

eb-local’s settings, layered lowest first: built-in defaults, the site file, a site profile, the user file, a user profile, EB_LOCAL_* variables, command-line options. Every value keeps where it came from. The storage settings come only from the site layer: a user cannot point builds at a shared file system. Secrets are named sources, never values.

Types

pub const Trash = enum[source][autodoc]

What clean and uninstall do with what they remove: rtrash moves it to the trash, and stops when rtrash is not on PATH; none removes nothing without --delete; auto is rtrash when rtrash is on PATH, else none.

auto[source]
rtrash[source]
none[source]
pub const StorageMode = enum[source][autodoc]

Where managed builds put their workspace. auto uses a Slurm allocation when one is configured, and a workstation otherwise.

auto[source]
local[source]
pub const NodeType = struct[source][autodoc]

A node type: a name, and the sbatch options that place a job on it.

name: []const u8[source]
sbatch: []const u8[source]

sbatch options, words separated by spaces.

from: []const u8 = ""[source]

The file and line that set this node type.

pub const Secret = struct[source][autodoc]

A secret: the variable eb receives, and where its value is read from. The value itself is read only for a build, by secrets.resolve.

name: []const u8[source]

The variable eb receives.

source: []const u8[source]

env:VAR, file:PATH or nimvault:ENTRY.

from: []const u8[source]
pub const EessiVar = struct[source][autodoc]

An EESSI setting exported before the stack loads, such as EESSI_IGNORE_LMOD_ERROR_ZEN4_GCC1220. Not a secret: config shows it.

name: []const u8[source]
value: []const u8[source]
from: []const u8[source]
pub const Settings = struct[source][autodoc]

Every setting in force, each with where it came from. The defaults here are the built-in ones; load puts the files, variables and options on top.

profile: ?[]const u8 = null[source]
prefix: Setting([]const u8) = .{ .value = "~/eessi" }[source]

EESSI-extend’s own default, so eb-local eb and EESSI-extend loaded by hand install into the same tree.

project: Setting(?[]const u8) = .{ .value = null }[source]
stack_module: Setting([]const u8) = .{ .value = "EESSI/2026.06" }[source]
extend_module: Setting([]const u8) = .{ .value = "EESSI-extend/2026.06-easybuild" }[source]
dev_buildenv: Setting([]const u8) = .{ .value = "buildenv/default-foss-2026.1" }[source]
buildenv_for: [families.len]Setting([]const u8) = .{ .{ .value = "buildenv/default-foss-2026.1-CUDA-13.3.0" }, .{ .value = "buildenv/default-lfoss-2026.1" }, .{ .value = "buildenv/default-intel-2026.1" }, .{ .value = "" }}[source]

The build environment for each compiler family other than GCC, used when dev.buildenv is left at its default; “” means none exists and eb-local’s RPATH wrappers stand in.

dev_modules: Setting([]const []const u8) = .{ .value = &.{} }[source]
allocation_hint: Setting([]const u8) = .{ .value = "" }[source]
site_toolchains: Setting([]const []const u8) = .{ .value = &.{} }[source]

NAME/VERSION toolchains the EESSI hooks accept besides foss and lfoss.

node_types: Setting([]const NodeType) = .{ .value = &.{} }[source]

Node types eb-local submit sends a build to: a name and the sbatch options that place a job on that node type. Site file only.

node_types_old_key: ?[]const u8 = null[source]

Where the site file listed them as [build.targets], their name before 3.2.0, which is read until 4.0.0.

trash: Setting(Trash) = .{ .value = .auto }[source]
logs_older_than_days: Setting(u32) = .{ .value = 30 }[source]
storage_mode: Setting(StorageMode) = .{ .value = .auto }[source]
node_local_root: Setting([]const u8) = .{ .value = "" }[source]
node_local_mount: Setting([]const u8) = .{ .value = storage.default_mount }[source]

Each allocation’s mount below node_local_root: %u the user, %j the job id.

node_local_fstype: Setting([]const u8) = .{ .value = "xfs" }[source]
shared_scratch: Setting([]const []const u8) = .{ .value = &.{} }[source]
nimvault_program: Setting([]const u8) = .{ .value = "" }[source]

The nimvault program; empty means the first on PATH.

nimvault_vault: Setting([]const u8) = .{ .value = "" }[source]

The vault nimvault reads (its –vault); empty leaves nimvault to find one from NIMVAULT_VAULT_REPO or the current directory.

secrets: std.ArrayList(Secret) = .empty[source]
build_secrets: Setting(?[]const []const u8) = .{ .value = null }[source]

The secrets a build gets, by name. Null, when nothing sets build.secrets, is every secret.

clear_foreign_prefixes: Setting(bool) = .{ .value = false }[source]

Drop path entries and compiler wrappers that resolve outside the approved prefixes. Off unless a file or EB_LOCAL_BUILD_CLEAR_FOREIGN_PREFIXES sets it.

approved_prefixes: Setting([]const []const u8) = .{ .value = &.{} }[source]

Absolute prefixes, besides EESSI and the install prefix, that doctor and a clearing build treat as approved. Site file only.

cvmfs_parallel: Setting(u8) = .{ .value = 0 }[source]

How many tasks doctor --cvmfs uses for a metadata read. 0 runs none. --cvmfs-parallel overrides it. Off, and the flag, stay off unless set.

mpi_transports: Setting([]const []const u8) = .{ .value = &.{} }[source]

Transports doctor --mpi may hello inside an allocation: ofi, ucx. Site file only. Empty runs no hello. A build never reads this.

eessi: std.ArrayList(EessiVar) = .empty[source]
pub const Layer = enum[source][autodoc]

Whose file a source is. Only the site layer may set the storage settings, build.site_toolchains and build.node_types.

site[source]
user[source]
pub const Source = struct[source][autodoc]

One configuration file, already read and trusted.

path: []const u8[source]
text: []const u8[source]
layer: Layer[source]
pub const Overrides = struct[source][autodoc]

Values from the command line, which load puts above every other layer. The program sets profile, project and buildenv from --profile, --project and --buildenv; no option sets prefix.

profile: ?[]const u8 = null[source]
prefix: ?[]const u8 = null[source]
project: ?[]const u8 = null[source]
buildenv: ?[]const u8 = null[source]
pub const Diagnostic = struct[source][autodoc]

Why the configuration was refused, filled in when error.Invalid is returned: one message naming the file and line, or the variable.

message: []const u8 = ""[source]
pub const SourceCheck = union(enum)[source][autodoc]

What checkSecretSource found.

ok[source]
unknown[source]

Not env:, file: or nimvault:, as when a value is written in its place.

refused: []const u8[source]

One of those, and what is wrong with the rest of it.

Error sets

pub const Error = error{Invalid} || Allocator.Error[source][autodoc]

error.Invalid when a file, variable or option is refused, with the reason in the Diagnostic.

Functions

pub fn Setting(comptime T: type) type[source][autodoc]

A value and where it came from, as eb-local config shows it: default, a file and line with its layer and profile, a variable or an option.

pub fn validNodeTypeName(n: []const u8) bool[source][autodoc]

A node type’s name: what –on names and a job name carries.

pub fn validSbatchOptions(v: []const u8) bool[source][autodoc]

sbatch options eb-local passes as separate words, never through a shell: options only, and characters that need no quoting.

pub fn ebRoot(a: Allocator, software: []const u8) Allocator.Error![]const u8[source][autodoc]

The EBROOT name EasyBuild writes for software. convert_name replaces + with plus, - with min and drops ., then the result is uppercased. llvm-compilers is EBROOTLLVMMINCOMPILERS.

pub fn validModule(name: []const u8) bool[source][autodoc]

Module names as Lmod writes them. Anything else could change the meaning of the lines env and dev print for eval.

pub fn validSecretName(name: []const u8) bool[source][autodoc]

A variable name a secret may set: a shell name that is not one the build depends on for its paths or loader.

pub fn validEessiName(name: []const u8) bool[source][autodoc]

A name [eessi] may set: EESSI_ and a shell name, not one eb-local owns or one build.site_toolchains sets.

pub fn validEessiValue(v: []const u8) bool[source][autodoc]

A value [eessi] may give: at most 4096 bytes, with no line break or NUL.

pub fn checkSecretSource(source: []const u8) SourceCheck[source][autodoc]

Whether a secret may name source: env: and a variable name, file: and an absolute or ~/ path, or nimvault: and an entry that does not start with -. None may hold a line break or NUL.

pub fn buildGets(s: Settings, name: []const u8) bool[source][autodoc]

Whether a build gets the secret name: build.secrets names it, or nothing sets build.secrets.

pub fn buildSecrets(a: Allocator, s: Settings) Allocator.Error![]Secret[source][autodoc]

The secrets a build gets, in the order the configuration defines them.

pub fn withheldSource(s: Settings, sec: Secret) ?[]const u8[source][autodoc]

The variable whose value would bring a secret the build does not get into its environment under another name: the one an env: source names. Null for a secret the build gets, another kind of source, or a variable a secret may not set, such as PATH, which the build needs.

pub fn validToolchain(tc: []const u8) bool[source][autodoc]

NAME/VERSION, each part letters, digits, ‘.’, ‘_’ or ‘-‘.

pub fn toolchainsJson(a: Allocator, tcs: []const []const u8) Allocator.Error![]const u8[source][autodoc]

The JSON list the EESSI hooks read, [{“name”: N, “version”: V}, …]; the parts were checked by validToolchain, so nothing needs escaping.

pub fn profileNames(a: Allocator, t: *const toml.Table) Allocator.Error![]const []const u8[source][autodoc]

Profile names a file defines.

pub fn load( a: Allocator, sources: []const Source, env: *const std.process.Environ.Map, cli: Overrides, diag: *Diagnostic) Error!Settings[source][autodoc]

The configuration in sources (site first, then user), with env and cli on top.

pub fn legacyToToml(a: Allocator, text: []const u8, diag: *Diagnostic) Error![]const u8[source][autodoc]

The 1.x site file: key = value lines, parsed, never sourced. Kept so a site’s existing eb-local.conf keeps working. Each setting becomes a dotted TOML key on the line it is on, so that eb-local config and the errors name that line.

Constants

pub const families = ...[source][autodoc]

The compiler families dev tells apart after the modules load, each by the EBROOT variable of its compiler module, in rising precedence. GCC is the rest and uses dev.buildenv. The names are EasyBuild’s: a hyphen in the software name becomes “min”, so llvm-compilers sets EBROOTLLVMMINCOMPILERS.

compiler is the software name of the family’s compiler module and version the variable that module sets to its version. Together they name the build environment a site installs at the compiler’s own toolchain level, buildenv/default-<compiler>-<version>, which dev tries when the family’s configured build environment is not installed. CUDA is not a toolchain and has none.

pub const no_buildenv = "none"[source][autodoc]

The EB_LOCAL_DEV_BUILDENV_FOR_* word for “no build environment”.

pub const secret_env_prefix = "EB_LOCAL_SECRET_"[source][autodoc]

EB_LOCAL_SECRET_NAME=SOURCE names where the secret NAME comes from.

pub const eessi_owned = ...[source][autodoc]

The EESSI variables eb-local sets or clears itself: where an install goes and which CPU or GPU target is used. [eessi] cannot set them.