NixAI — AI Agent Host
Purpose
nixai is the AI infrastructure host.
It runs the AI agent, local inference via Ollama, Mnemosyne memory sync, and voice services.
Entry Point
- Main file:
hosts/server/nixai/default.nix - Supporting files:
ai-agent.nix,backend.nix,mnemosyne.nix,voice.nix.
Architecture / Services / Scope
AI Agent
- Containerised AI agent with a web dashboard, an OpenAI-compatible API server, and a webhook platform.
- Primary model runs on OpenCode Go (
deepseek-v4.1-flash), with OpenRouter as the fallback provider. - Memory is enabled, backed by Mnemosyne sync.
- Voice is enabled, using the local Wyoming STT server.
- A hardened SSH daemon is provisioned inside the container for agent administration.
Local Inference
- Runs local models on the host’s AMD iGPU (ROCm/Vulkan), loading a small set of chat and embedding models.
- Used by the agent for local model access.
Mnemosyne (mnemosyne.nix)
- Mnemosyne memory provider sync server, used by the agent for persistent memory. Served on its own vhost.
Voice (voice.nix)
- Wyoming Piper (TTS) and faster-whisper (STT) servers exposed over TCP for local voice assistants.
Secrets
Declared secrets
| Secret key | Purpose |
|---|---|
AI_AGENT/OPENROUTER_API_KEY | OpenRouter model API key (fallback and auxiliary models) |
AI_AGENT/OPENCODE_GO_API_KEY | OpenCode Go model API key (primary model) |
AI_AGENT/DISCORD_BOT_TOKEN | Discord bot token |
AI_AGENT/API_SERVER_TOKEN | Agent API server auth |
MNEMOSYNE_SYNC_KEY | Mnemosyne sync API key |
Operational Notes / Assumptions
- Ollama relies on the AMD iGPU; ROCm on the iGPU is noted as unreliable upstream, so the config pins an override and waits on a Vulkan fix.
- The agent dashboard, Mnemosyne, and the voice/whisper endpoints are exposed through the IO Coordinator reverse proxy.
- The agent’s SSH port is opened to the subnet for administration.
- The gateway control directory (
/var/lib/hermes/.hermes) is narrowed to0750by an appendedsystemd.tmpfilesrule inhermes/core.nix: the gateway client refuses a control directory another user can write, while the upstream module creates it2770so group members share it. The state directory and the.hermessubdirectories keep2770, because the container relies on thesetgidbit when it changes ownership.