# `Hyper.Cfg`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/hyper/cfg.ex#L1)

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.

# `source`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
