From 5191bd16b2a905b8409838e34eb0baca96f08580 Mon Sep 17 00:00:00 2001 From: Nico <53304086+thisguyStan@users.noreply.github.com> Date: Mon, 23 Mar 2026 04:33:01 +0100 Subject: [PATCH] feat: load config from env vars (#576) Signed-off-by: Nico --- crates/core/config/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/core/config/src/lib.rs b/crates/core/config/src/lib.rs index 5edf24c2..76a6b2e1 100644 --- a/crates/core/config/src/lib.rs +++ b/crates/core/config/src/lib.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, path::Path}; use cached::proc_macro::cached; -use config::{Config, File, FileFormat}; +use config::{Config, Environment, File, FileFormat}; use futures_locks::RwLock; use once_cell::sync::Lazy; use serde::Deserialize; @@ -109,6 +109,8 @@ static CONFIG_BUILDER: Lazy> = Lazy::new(|| { cwd = path.parent(); } + builder = builder.add_source(Environment::with_prefix("REVOLT").separator("__")); + builder.build().unwrap() }) });