Skip to content

Instantly share code, notes, and snippets.

@jwiegley
Created November 21, 2025 20:04
Show Gist options
  • Select an option

  • Save jwiegley/d17dfe47f43d1d6253ad7245f0b00760 to your computer and use it in GitHub Desktop.

Select an option

Save jwiegley/d17dfe47f43d1d6253ad7245f0b00760 to your computer and use it in GitHub Desktop.
rspamd: Add LiteLLM GPT integration
- **modules/services/rspamd.nix**:
- Define a new SOPS secret `litellm-vulcan-lan` owned by the `rspamd` user,
ensuring the secret is re‑loaded when the service restarts.
- Extend `serviceConfig.LoadCredential` to expose the LiteLLM API key to the
daemon alongside the existing controller password.
- Introduce a temporary “info” logging level for GPT debugging (previously
“warning”).
- Add a new `gpt.conf` override containing full LiteLLM proxy configuration
(type, URL, model, parameters, timeout, prompt, autolearn, reason header,
and placeholder API key).
- Add a post‑install script that reads the SOPS‑managed API key, writes it
into `/var/lib/rspamd/override.d/gpt.conf`, and sets appropriate ownership
and permissions.
- Adjust comments and documentation throughout the file to reflect the new
GPT/LLM integration flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment