✨ darkone.service.openclaw
OpenClaw assistant of an AI space (gateway + control UI, behind the zone SSO).
One instance per ai-space host, declared like any service:
- hostname: "ia-pro" profile: "ai-space" users: ["alice"] # members: Kanidm group `space-ia-pro` features: ["monitoring-node"] # alerts: space down, gateway unit failed services: { openclaw: {} }- access: Caddy forward auth, members of
space-<host>only (proxy.spaceMembersOnly); OpenClaw trusts the zone gateway as proxy (trusted-proxy) and reads the identity fromx-auth-request-email; - tailnet: a member’s personal device passes without the SSO
(
proxy.tailnetIdentity), the only way in for the Android app; - devices: a member’s browser is paired on first visit, without operator
admin (granted from the host CLI only); the app with
openclaw qr; - port: reachable from the zone gateway only;
- host CLI:
openclaw(alone: the TUI), re-run as the service user, pasttrusted-proxywith the gateway password (openclaw-gateway-password,just space-init); admins andcliUsers(default: the owner) only; - state:
/var/lib/openclaw(provider logins, sessions, workspace, Matrix E2EE keys); - owner (
owner, default: the only member): its subscription runs the agent, it gets approval requests and proactive messages; - Matrix: DM channel with the bot
@<host>:<domain>, members only, rooms ignored, one session per member when several, when the network has Matrix andjust space-init <host>created the bot (markervar/generated/spaces/<host>.nix, token in the space’s sops file); exec approvals asked to the owner in DM; - agent tooling: MCP, skills, Claude Code / Codex / OpenCode and
packagesof the space (darkone.host.ai-space), shared with the members’ homes; - identity (
identity: name, emoji, avatar): imposed, also on the Matrix bot (display name; avatar, else the emoji drawn), the avatar uploaded byjust space-init <host>(eval warning when out of date); mutableConfig: config writable from the UI and the CLI, Nix keys merged at each start (imposed: access, channels, plugins, identity, store paths; seeded once: model, exec, talk…), owner getsoperator.admin;- workspace (
/var/lib/openclaw/workspace):workspacefiles (AGENTS.md, SOUL.md…) replaced at each start, others left to the agent; - projects: the space’s shared
projectsDiris the agent’s working dir (agents.defaults.cwd),projectsgit-cloned once into it; - coding agents (Claude Code, Codex, OpenCode of the space): background
workers (
coding-agentskill), chat-bound sessions (/acp spawn, acpx); - Talk (
talk): live voice conversation (browser, Android app), OpenAI GPT-Live (ChatGPT login first) or Gemini Live (GEMINI_API_KEY), work delegated to the agent (agent-consult); - workflows: Lobster pipelines (
lobster,.lobsterfiles throughworkspace), declared automations (automations, kept in sync, others left to the agent and the UI); - voice notes: whisper.cpp (
transcription); on a microVM guest the hypervisor’s server (large-v3-turbo), local ggmlsmallas fallback; local only on bare metal.
darkone.service.openclaw = { workspace."AGENTS.md" = ./agents/AGENTS.md; projects.notes = "git@forge.example.com:alice/notes.git";};Models: model + extraModels (/model in the chat), the owner’s
subscriptions first, else an API key (apiKeys, sops openclaw/<VAR>);
providers adds OpenAI-compatible endpoints (Nous Portal…).
Options
Section titled “Options”-
enable
boolEnable the OpenClaw assistant of an AI space -
owner
nullOr strMember owning the space: its subscription logs the agent in (model), it receives approval requests and proactive messages. Required with several members (usersorder is not kept). -
cliUsers
listOf strMembers running the host CLI (openclaw) as the service user, by a sudo rule: TUI, provider logins, admin. Its!shell commands run asopenclawtoo, the space’s tokens within reach. -
model
strMain model,<provider>/<model>: through the owner’s subscription when its provider is insubscriptions, else an API key (apiKeys). -
extraModels
listOf strOther models of the catalog, picked in the chat with/model; same rules asmodel. -
subscriptions
listOf ( enum [ "anthropic" "openai" ] )Subscriptions of the owner, used first by the models of their provider:anthropic: Claude Pro/Max through theclaudeCLI (needsdarkone.host.ai-space.enableClaude);openai: ChatGPT Plus/Pro through thecodexplugin.
Other providers, or one left out, go through an API key (
apiKeys). -
apiKeys
listOf (strMatching "[A-Z][A-Z0-9_]*")Provider API keys, by variable: read from the space’s sops file (openclaw/<VAR>,just space-sops <host>) into the gateway environment.ANTHROPIC_API_KEYis dropped beside theanthropicsubscription, which it would override. -
providers
attrsProviders absent from OpenClaw (Nous Portal…), OpenAI-compatible by default.- baseUrl
strAPI endpoint. - api
strAPI flavour (OpenClawmodels.providers.<id>.api). - apiKey
nullOr (strMatching "[A-Z][A-Z0-9_]*")Key variable, read likeapiKeys. - models
listOf strModel ids, referenced as<provider>/<id>.
- baseUrl
-
mutableConfig
boolConfig writable from the UI andopenclaw config set, the owner being operator admin. Nix keys merged at each start:- imposed, rewritten (also on any change of the file): gateway and
access, Matrix channel, plugins, MCP servers,
identity, store paths; - seeded, written when absent, then the UI rules:
model,exec, talk, ACP, skill switches.
- imposed, rewritten (also on any change of the file): gateway and
access, Matrix channel, plugins, MCP servers,
-
exec
enum [ "full" "auto" "ask" "allowlist" "deny" ]Command policy of the agent (OpenClawtools.exec.mode):full: any command, unapproved (OpenClaw default);ask: allowlisted commands run, any other asks the owner;auto: a model reviews misses, the owner decides when it is unsure;allowlist,deny: allowlisted commands only, none.
Allowlist:
openclaw approvals allowlist add --agent main <path>. With theclaude-cliruntime, pipes, redirections and substitutions are refused before any prompt outsidefull. -
identity.name
nullOr strName of the assistant, in the UI and on the Matrix bot (default there: the host’sname). -
identity.emoji
nullOr strEmoji of the assistant, in the UI; drawn as the Matrix bot’s avatar withoutavatar. -
identity.avatar
nullOr (either str path)Avatar of the assistant:- file (png, jpg, gif, webp; 2 MB at most for the UI) or
https://URL: UI and Matrix bot, uploaded byjust space-init <host>; - path relative to the workspace: UI only, the emoji on Matrix.
- file (png, jpg, gif, webp; 2 MB at most for the UI) or
-
matrixProfile
rawProfile of the Matrix bot: display name, avatar and its fingerprint. -
workspace
attrsFiles of the agent workspace, by relative path: content or file. Replaced at each gateway start; undeclared files belong to the agent. -
projects
attrsGit repositories cloned once into<projectsDir>/<name>(darkone.host.ai-space.projectsDir), never pulled. SSH remotes use the key ofopenclaw(/var/lib/openclaw/.ssh, created by hand); the server key is accepted on first clone. -
talk.enable
boolTalk: live voice conversation (browser, Android app) -
talk.provider
enum [ "openai" "google" ]Realtime voice:openai: GPT-Live, browser WebRTC, SDP through the gateway;google: Gemini Live, audio relayed by the gateway, needsGEMINI_API_KEYinapiKeys(Google AI Studio key).
-
talk.model
strRealtime model, by provider:openai:gpt-live-1-codexthrough the owner’s ChatGPT login (openclaw models auth login --provider openai), else a Platform key (OPENAI_API_KEY);gpt-live-1,gpt-realtime-2.1(camera): Platform key only. Pinned: unset, a Platform key wins over ChatGPT;google:gemini-3.1-flash-live-preview,gemini-3.8-live.
-
talk.voice
strVoice of the model’s route:gpt-live-1-codex:cove,arbor,breeze,ember,juniper,maple,sol,spruce,vale;- Gemini Live:
Kore,Puck,Charon,Aoede,Zephyr… (30 prebuilt voices, listed in Settings → Talk).
-
talk.instructions
nullOr linesInstructions appended to OpenClaw’s realtime prompt. -
lobster
boolLobster workflows: pipelines run by the gateway, with approval steps and resume, plusllm-task(structured LLM step). Workflow files go throughworkspace("workflows/<name>.lobster"). -
automations
attrsScheduled agent runs declared in Nix, kept in sync at each start (nix-<name>, edits from the UI overwritten); those of the agent and the UI are left alone.- schedule
strCron expression (5 or 6 fields), orevery <duration>(every 2h). - message
linesPrompt of the agent’s run. - announce
boolSend the final reply to the chat (owner’s last channel). - model
nullOr strModel override,<provider>/<model>or alias. - enable
boolFalse: kept disabled; once so, re-enabled from the UI only (openclaw automations enable <id>).
- schedule
-
transcription.enable
boolTranscribe voice notes (whisper.cpp, CPU). -
transcription.backend
enum [ "hypervisor" "local" ]Where voice notes are transcribed:hypervisor: the hypervisor’s whisper.cpp server (bigger model, more cores),modelas fallback;local: on this host, withmodel.
-
transcription.model
pathwhisper.cpp ggml model of local transcription (localbackend, fallback). -
transcription.language
strSpoken language (auto: detected per note).
darkone.service.openclaw = { enable = false; owner = "alice"; cliUsers = [ ]; model = "openai/gpt-6-astra"; extraModels = [ ]; subscriptions = [ ]; apiKeys = [ ]; providers.baseUrl = "https://inference-api.nousresearch.com/v1"; providers.api = "openai-completions"; providers.apiKey = "NOUS_API_KEY"; providers.models = [ ]; mutableConfig = false; exec = "ask"; identity.name = "Jarvis"; identity.emoji = "🦉"; identity.avatar = lib.literalExpression "./jarvis.png"; matrixProfile = matrixProfile; workspace = { }; projects = { }; talk.enable = false; talk.provider = "google"; talk.model = { openai = "gpt-live-1-codex"; google = "gemini-3.1-flash-live-preview"; } .${cfg.talk.provider}; talk.voice = "sol"; talk.instructions = "Réponds en français, en phrases courtes."; lobster = false; automations.schedule = "0 7 * * 1-5"; automations.message = ""; automations.announce = true; automations.model = null; automations.enable = true; transcription.enable = true; transcription.backend = if config.darkone.system.microvm.hypervisor != null then "hypervisor" else "local"; transcription.model = pkgs.fetchurl { url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin"; sha256 = "0ywqxbziyp2bv72riyjpw4brk9v46d4cfbjfwqvvjrrq0srakqqv"; }; transcription.language = "fr";};Source: modules/service/openclaw.nix 🡕