[Feature] Switch primary configuration to YAML file #9

Open
opened 2026-07-13 04:26:14 +00:00 by ilvoen · 0 comments
Owner

Motivation

Replace the current flat flag/env-based Config struct with a YAML file (config.yaml), loaded via gopkg.in/yaml.v3. Structure config as one sub-tree per module, e.g.:

modules:
  webserver:
    enabled: true
    content_dir: ./content
  keyserver:
    enabled: true
    keys_dir: ./keys

Secrets (tokens, webhook secrets) stay out of the file itself — use ${ENV_VAR} placeholders resolved at load time, so the YAML file itself can be safely committed as a template/example.

Add a -config flag (default e.g. ./config.yaml) to point to the file location. Keep this independent from the module refactor (#1) but coordinate — modules should read their config from their own sub-tree, not a shared flat struct.

Proposal

No response

Alternatives Considered

No response

### Motivation Replace the current flat flag/env-based `Config` struct with a YAML file (`config.yaml`), loaded via `gopkg.in/yaml.v3`. Structure config as one sub-tree per module, e.g.: ```yaml modules: webserver: enabled: true content_dir: ./content keyserver: enabled: true keys_dir: ./keys ``` Secrets (tokens, webhook secrets) stay out of the file itself — use `${ENV_VAR}` placeholders resolved at load time, so the YAML file itself can be safely committed as a template/example. Add a `-config` flag (default e.g. `./config.yaml`) to point to the file location. Keep this independent from the module refactor (#1) but coordinate — modules should read their config from their own sub-tree, not a shared flat struct. ### Proposal _No response_ ### Alternatives Considered _No response_
ilvoen added this to the v0.1.0 milestone 2026-07-13 04:26:14 +00:00
ilvoen added the enhancement label 2026-07-13 04:26:14 +00:00
ilvoen added this to the Varde Backlog v0.1.0 project 2026-07-13 04:26:14 +00:00
ilvoen moved this to To Do in Varde Backlog v0.1.0 on 2026-07-13 04:26:17 +00:00
ilvoen moved this to In Progress in Varde Backlog v0.1.0 on 2026-07-14 13:49:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ilvoen/varde#9