pub struct LacsConfig {
pub daemon: Option<DaemonSection>,
pub llm: Option<LlmSection>,
pub policy: Option<PolicySection>,
pub audit: Option<AuditSection>,
pub storage: Option<StorageSection>,
}Expand description
Top-level structure of ~/.config/sysknife/config.toml.
All fields are optional — absent sections use built-in defaults.
Fields§
§daemon: Option<DaemonSection>§llm: Option<LlmSection>§policy: Option<PolicySection>§audit: Option<AuditSection>§storage: Option<StorageSection>Implementations§
Source§impl LacsConfig
impl LacsConfig
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Returns the path to the config file (~/.config/sysknife/config.toml).
Sourcepub fn load() -> Self
pub fn load() -> Self
Load ~/.config/sysknife/config.toml.
Returns LacsConfig::default() (all None) if the file is absent.
Falls back to defaults on parse error (with a warning). I/O errors
other than NotFound (e.g. permission denied) are also warned so the
user knows their config file exists but could not be read.
Sourcepub fn apply_defaults_to_env(&self)
pub fn apply_defaults_to_env(&self)
Set environment variables from the config file for any key that is NOT already present in the process environment.
§Safety note
This must be called during single-threaded startup, before the async
runtime or any thread pool is initialised. Modifying env vars while
other threads are reading them is undefined behaviour. Both main.rs
(daemon) and the Tauri setup hook (shell) satisfy this contract.