Hyper.Cfg (Hyper v0.1.0)

Copy Markdown View Source

The one place every Hyper configuration value is read.

Configuration is layered, highest priority first:

  1. /etc/hyper/config.exs — runtime app env, unprivileged node only. The right place for secrets loaded at boot.
  2. /etc/hyper/config.toml — static, shared with hyper-suidhelper. Anything that influences a root process lives here so the two sides can never drift.
  3. Compile-time config/config.exs — performance fine-tuning.
  4. Built-in defaults.

Each value names which of these layers it may be read from. Privileged tool paths and the helper-shared [jails] table are config.toml-only, so the unprivileged config.exs can never override a root-impacting path.

Read values through the focused submodules — Hyper.Cfg.Tools, Hyper.Cfg.Dirs, Hyper.Cfg.Jails, Hyper.Cfg.Budget, ... — never reach for Application.get_env or Hyper.Cfg.Toml directly.

Summary

Types

source()

@type source() ::
  {:exs, {keyword(), atom()}}
  | {:runtime, atom() | {module(), atom()}}
  | {:toml, String.t()}
  | {:default, term()}