Expand description
~/.config/sysknife/config.toml — optional user configuration file.
§Resolution order (highest priority wins)
- Environment variables (always win — set by the caller or systemd unit)
- Values in
~/.config/sysknife/config.toml - Built-in defaults (defined in
sysknife-brainandsysknife-core)
§Usage
Call LacsConfig::load once at startup, then call
LacsConfig::apply_defaults_to_env to populate env vars for any
key that the config file sets but that is not already present in the
environment. After that, the rest of the codebase continues reading env
vars as before — no callers need to change.
use sysknife_core::config::LacsConfig;
LacsConfig::load().apply_defaults_to_env();§Example config.toml
[daemon]
socket = "/run/sysknife/daemon.sock" # written as a raw path, not a URI
database = "/var/lib/sysknife/daemon.sqlite"
[llm]
provider = "ollama" # "ollama" | "anthropic" | "openai" | "gemini" | ...
model = "qwen3:8b" # default — see sysknife-brain DEFAULT_OLLAMA_MODEL
ollama_url = "http://localhost:11434"
max_turns = 10
# Optional: override the auto-detected thinking mode for Ollama.
# Default: auto-detect from the model name (qwen3 / qwq / deepseek-r → true).
# Set to `false` on CPU-only hosts running thinking models — thinking
# traces exceed Ollama's internal request timeout on 4 vCPUs.
# ollama_think = falseStructs§
- Audit
Forward Section [audit.forward]section. Each subsection enables one external sink.- Audit
Section [audit]section.- Daemon
Section [daemon]section.- Lacs
Config - Top-level structure of
~/.config/sysknife/config.toml. - LlmSection
[llm]section.- Policy
Section [policy]section. Currently holds per-action risk-level overrides.- Storage
Pool Section [storage.pool]section.- Storage
Section [storage]section. Selects the audit-log backend.- Syslog
Forward Section [audit.forward.syslog]section.
Enums§
- Storage
Backend - Type-state projection of
StorageSectionwith cross-field invariants enforced.
Functions§
- config_
path - Returns the path to
~/.config/sysknife/config.toml, respectingXDG_CONFIG_HOMEif set. - prefs_
path - Returns the path to
~/.config/sysknife/prefs.md, respectingXDG_CONFIG_HOMEif set. Same directory asconfig.toml.