tentaflaketentaflake.dev★ Star on GitHub31
[ 01 / 08 ] · AGENT ORCHESTRATION HOST

Your own private
AI agent host.

Run one or many AI agents on a single machine — a coding assistant, a web researcher, a personal agent, each with its own identity, secrets, and tools.

A personal AI server you own and control — every agent isolated, all declared in one file.

New to NixOS? Here's the deal. — 20-second primer[ CLICK ]

NixOS is a Linux distribution where your entire operating system — every package, service, user, and firewall rule — is defined as code in a Git repository. Change a config, run one command, and the whole system updates atomically. No manual installs, no config drift, no "works on my machine."

Tentaflake is a pre-built template for NixOS that adds AI agent support. Clone the repo, define your agents in a few lines, and nixos-rebuild switch deploys everything — containers, secrets, networking, the works. And you don't need to know Nix to start — pick a path below.

16 NixOS modules · Hermes + ZeroClaw + OpenCode runtimes · Operator shell · tentaflake top TUI ·
Go audit daemon · installer + live ISO · MIT

[ CHOOSE YOUR PATH ] · three ways to start, zero wrong answers

Path 1: Try it now — Live USB (boot from USB, nothing touches disk)

Boot any x86_64 machine from a USB stick. Agents run entirely in RAM — pull the USB and every trace is gone. Requires no install, no existing Nix setup.

You need a way to build the ISO. Three options (any Linux/Mac/Windows):

A: Install Nix (recommended) — curl --proto '=https' --tlsv1.2 -sSf https://nix.dev/install-nix | sh
B: Docker (no Nix install) — docker run --rm -v "$PWD:/build" -w /build nixos/nix sh -c "nix build .#live-agent-iso"
C: Pre-built — check GitHub Releases

Then: git clonenix build .#live-agent-isosudo dd if=result/iso/... of=/dev/sdX → boot → enter API key → docker exec -it hermes-default hermes chat

Path 2: Install permanently — Installer ISO (wizard installs NixOS + agents to disk)

Build a bootable USB that installs NixOS + Tentaflake to disk via an interactive TUI wizard. Requires a separate build machine (any Linux/Mac/Windows — install Nix or use Docker, same options as Path 1).

$ git clone && cd tentaflake

$ nix build .#installer-iso

$ sudo dd if=result/iso/tentaflake.iso of=/dev/sdX bs=4M

Boot from USB → TUI wizard walks you through hostname, disk selection, user setup → installs (~15 min) → reboot → you have a permanent NixOS machine with AI agents ready to go.

Path 3: Already on NixOS? add tentaflake to your existing config

Add tentaflake as a flake input to your existing NixOS config. Create a my-agents.nix file listing your agents, then rebuild.

# my-agents.nix — each item is one isolated agent
{ mkHermesAgent, mkZeroClawAgent, mkOpenCodeAgent }: [
  (mkHermesAgent {
    name = "coding";
    envFile = "/run/secrets/coding.env";
    settings.toolsets = [ "terminal" "memory" "skills" ];
  })
  (mkHermesAgent {
    name = "research";
    envFile = "/run/secrets/research.env";
    settings.web.backend = "firecrawl";
  })
  # ZeroClaw and OpenCode agents work the same:
  #   (mkZeroClawAgent { … }) · (mkOpenCodeAgent { name = "code"; hostPort = 4096; … })
]

Then: sudo nixos-rebuild switch --flake .#tentaflake — agents appear as Docker containers.

View on GitHub →Explore features

[ BY THE NUMBERS ] · primitives compiled into one flake

01
Agents per host
02
16
NixOS modules
03
0700
State dir perms
04
3
Lines per agent
[ 02 / 08 ] · MAIN FEATURES
// main features //

Everything in one flake.

Ten primitives that ship declared together — agents, secrets, containers, networking, TTS, audit, operator shell, security, and a bootable installer.

01[ AGENTS ]

Flexible isolation model

Run each agent in its own hardened container — Hermes agents also get a dedicated Linux user — for maximum security, or consolidate multiple agent personas into a single container via agent profiles — each with isolated memory, config, and sessions. Choose per agent, not per deployment. All three runtimes — Hermes, ZeroClaw and OpenCode — share the same contract.

02[ AGENIX ]

Per-agent secrets

Encrypted .age files per agent, decrypted at activation into /run/agenix. No cross-contamination, never in the Nix store. agenixFile > envFile

03[ DOCKER ]

Ephemeral containers

Containers are stateless; personality and state live on mounted volumes. SeedDir seeds once, never overwrites.

04[ NIXOS ]

Fully declarative

Everything in one flake. nixos-rebuild switch applies the fleet atomically — and rolls back.

05[ LOCKFILE ]

Reproducible fleet

flake.lock pins every input, and agent images are pinned by digest — tags aren’t tracked by the lockfile. Same commit = same agent fleet, every time. No drift, no surprises.

06[ TTS ]

Piper TTS ready

Built-in Piper TTS server with an OpenAI-compatible /v1/audio/speech endpoint on :5001.

07[ ISO ]

Installer + live ISO

Two images: an installer that deploys to disk via a TUI wizard, and a live ISO that runs agents entirely in RAM — no install, no trace.

08[ AUDITD ]

Filesystem audit

tentaflake-auditd watches state dirs via fsnotify and logs every write to SQLite — with a read-only Agent Console web UI for browsing files and watching activity live.

09[ TAILSCALE ]

Tailnet, nothing else

Pre-configured Tailscale + SSH module. Agents reachable on the tailnet, exposed to nothing else.

10[ SHELL ]

Operator shell

tentaflake CLI, dynamic login banner with a per-agent memory column, tentaflake stats fleet CPU/memory dashboard (--hide makes it screenshot-safe), tentaflake top live TUI dashboard, zsh/oh-my-zsh, tmux, zoxide, lazygit — the landing experience when you SSH in. tentaflake agent add walks you through declaring a new agent — runtime, provider, model, API key (ports too for ZeroClaw) — and writes it to agents.json. No Nix required, and no typing a 73-character API key: it offers the one it finds on your USB stick, no label or filename needed.

[ 03 / 08 ] · ARCHITECTURE
// architecture //

One brain. Unlimited tentacles.

Each agent is an AI process — an LLM-powered assistant with its own tools, memory, and identity. tentaflake gives every agent its own state directory, Docker container, and API keys. Real OS-level isolation, not just a different folder in the same compose file. Or run teams of agents in one container via agent profiles — multiple personas sharing skills and resources while keeping separate configs and sessions. Choose per agent, not per machine.

NixOS Flake
flake.nix · configuration.nix
Tentaclecoding
runtimehermes
userhermes-coding
state · 0700
/var/lib/hermes-coding
agenix/run/agenix/hermes-coding-env
Tentacleresearch
runtimezeroclaw
user65534 · nobody
state · 0700
/var/lib/zeroclaw-research
agenix/run/agenix/zeroclaw-research-env
+∞
any runtime · any role · any count
no limit per host
one Hermes + one ZeroClaw shown · OpenCode is the third runtime · agents are infinitely composable
Shared services
Piper TTS
:5001
Tailscale
mesh VPN
Docker
runtime
agenix
secrets
[ 04 / 08 ] · COMPARISON
// comparison //

tentaflake versus the alternatives

Eight dimensions, four approaches to running agents on one box.

[ DIMENSION × APPROACH ]  [ 8 × 4 ]
Dimensiontentaflakedocker-composeVM per agentk8s namespace
01 Per-agent Linux user (Hermes)✓ built-in✗ shared✓ heavy~ pod SA
02 Declarative configNix flakeYAMLmanualYAML + Helm
03 Atomic rollback✓ rebuildsnapshotsrollout
04 Per-agent secretsagenix.env riskper-VMk8s secret
05 Encrypted-in-repo✓ agesealed
06 Filesystem audit + TUIauditd + top
07 Bootable installerISO wizard
08 Resource overheadlowlowhighhigh
[ 05 / 08 ] · THE MODULES
// the modules //

Composable NixOS modules

Each module configures one slice of the host. modules/default.nix aggregates them all — import it and override what you need.

01 / 16
[ BOOT ]

boot.nix

systemd-boot configuration, EFI variables.

02 / 16
[ LOCALE ]

locale.nix

Timezone, locale settings, console keymap, and a modern physical console — kmscon renders TTY1 with real TTF fonts and full Unicode instead of the 512-glyph legacy VT.

03 / 16
[ NETWORKING ]

networking.nix

Hostname, nftables firewall, NetworkManager, opt-in egress allowlist — host rules cover the agent fleet too. Strict perimeter by default.

04 / 16
[ HARDENING ]

hardening.nix

Sysctl + kernel-param hardening, explicit LSM order, AppArmor, journald limits. Security baked in, not bolt-on.

05 / 16
[ SSH ]

ssh.nix

Opt-in hardened OpenSSH — key-only auth, no root login, max 3 auth tries — plus fail2ban. Off by default; Tailscale SSH stays the primary access path.

06 / 16
[ TAILSCALE ]

tailscale.nix

Tailscale with SSH and tag:auto. Optional, off until you enable it.

07 / 16
[ NIX ]

nix-settings.nix

Flakes, automatic GC, trusted-users, substituters — plus daemon hardening: allowed-users, strict sandbox, disk headroom.

08 / 16
[ USERS ]

users.nix

Admin user in wheel + networkmanager groups.

09 / 16
[ PACKAGES ]

packages.nix

curl + git — minimal server essentials.

10 / 16
[ TTS ]

piper-tts-server.nix

Local Piper TTS, OpenAI-compatible API on port 5001 — sandboxed systemd unit with a configurable memory cap.

11 / 16
[ AUDITD ]

tentaflake-auditd.nix

Filesystem audit daemon — fsnotify watcher, debounced writes logged to SQLite. Paired with tentaflake top (live TUI) and the Agent Console (read-only web file explorer + live monitor).

12 / 16
[ SHELL ]

shell.nix

Interactive operator shell — tentaflake CLI, tentaflake-status banner, Starship prompt, zsh/oh-my-zsh, tmux, zoxide, lazygit, modern CLI tools. See docs/06-shell.md.

13 / 16
[ EDITOR ]

editor.nix

Optional Neovim via nvf — LSP, treesitter, telescope, gitsigns, blink-cmp. Languages: nix, bash, lua, markdown, yaml. Enable via tentaflake.editor.nvf.enable.

14 / 16
[ MCP ]

hive-research.nix

Host-side hive-research MCP server — unified web research (search, extract, crawl) with provider failover. Agents reach it on loopback; bring the server as a flake input.

15 / 16
[ OPTIONS ]

options.nix

Declares the whole tentaflake.* option surface with defaults from lib/constants.nix — plus renamed-option shims so old names keep evaluating with a warning.

16 / 16
[ AGGREGATE ]

default.nix

Imports every module above — the single entry point behind nixosModules.default.

mkHermesAgent — options reference[ 16 of 28 ]
optiondefaultdescription
namerequiredAgent identifier — user, group, container, state dir
stateDir/var/lib/…Isolated state directory
imagehermes-agent@sha256:4a2f23…OCI container image, digest-pinned (a mutable tag is rejected at build time)
allowMutableImagefalseAccept an unpinned image (locally-built) — gives up reproducibility
envFilenullPath to .env file (injected via --env-file)
agenixFilenullPath to agenix-decrypted env file
seedDirnullSOUL.md, AGENTS.md, skills/ — seeded on first boot
settingsnullAgent config.yaml — model routing, TTS, toolsets
extraVolumes[ ]Extra host:container:mode mounts
extraEnvironment{ }Extra env vars for the container
extraContainerConfig{ }Extra Docker options (merged deep)
autoStarttrueAuto-start with systemd
networkMode"host"Container network mode (host or bridge)
pidsLimit512Container --pids-limit (fork-bomb ceiling); null disables
createUsertrueCreate the hermes-<name> system user/group
cmd["gateway"…]Container entrypoint
Every agent container also runs with --security-opt=no-new-privileges:true by default.
mkZeroClawAgent { } — options reference[ 14 fields ]
optiondefaultdescription
namerequiredAgent identifier — container + state dir (zeroclaw-<name>)
agenixFilerequiredEnv file with API keys (injected via --env-file)
hostPortrequiredHost loopback port mapped to the gateway
servePortrequiredTailnet HTTPS port (tailscale serve)
imagezeroclaw@sha256:eae321…OCI container image (ghcr.io/zeroclaw-labs), digest-pinned
allowMutableImagefalseAccept an unpinned image (locally-built) — gives up reproducibility
stateDir/var/lib/…Isolated state directory
seedDirnullWorkspace files — seeded on first boot only
gatewayPort42617In-container gateway port
settings{ }TOML config.toml, mounted read-only — schema_version required
pidsLimit512Container --pids-limit (fork-bomb ceiling); null disables
extraEnvironment{ }Extra env vars for the container
extraVolumes[ ]Extra host:container:mode mounts
autoStarttrueAuto-start with systemd
mkOpenCodeAgent { } — options reference[ 20 fields ]
optiondefaultdescription
namerequiredAgent identifier — container + state dir (opencode-<name>)
hostPortrequiredHost loopback port forwarded to the gateway — orchestrators hit this
imageopencode@sha256:c2d5d6…OCI container image (ghcr.io/anomalyco), digest-pinned
allowMutableImagefalseAccept an unpinned image (locally-built) — gives up reproducibility
stateDir/var/lib/…Isolated state directory (XDG config/data)
workspaceDir<stateDir>/workspaceProject dir mounted rw at /workspace
seedDirnullWorkspace files — seeded on first boot only
gatewayPort4096In-container opencode serve port
servePortnullTailnet HTTPS port (tailscale serve) — must differ from hostPort
allowUnauthenticatedServefalseOpt out of the servePort credential check (something else gates access)
envFilenullPath to .env file (injected via --env-file)
agenixFilenullPath to agenix-decrypted env file
authFilenullProvider auth.json, mounted read-only into the data dir
settings{ }JSON opencode.json, mounted read-only — model, provider base URL
containerUid65534uid the container runs as; owns the state dir
containerGid65534gid the container runs as
autoStarttrueAuto-start with systemd
pidsLimit512Container --pids-limit (fork-bomb ceiling); null disables
extraEnvironment{ }Extra env vars for the container
extraVolumes[ ]Extra host:container:mode mounts
Publishing on servePort requires OPENCODE_SERVER_PASSWORD in the env file — asserted at eval, re-checked on the file contents before the serve unit starts.
[ 06 / 08 ] · COOKBOOK
// cookbook //

Recipes for every use case

Guides, references, and examples to build with tentaflake.

$ [ 10 ]  all · guide · reference · example
[ guide ]01

Quick Start

Clone, define an agent, set secrets, and deploy in five steps.

Read more →
[ reference ]02

Agent builder options

One builder per runtime — mkHermesAgent (15 fields), mkZeroClawAgent (13) and mkOpenCodeAgent (20).

Read more →
[ guide ]03

Agenix Secrets

Encrypt secrets in-repo with age — setup, architecture, troubleshooting.

Read more →
[ reference ]04

Available Modules

16 NixOS modules — boot, networking, hardening, ssh, tailscale, shell, editor, TTS, and more.

Read more →
[ example ]05

Two-Agent Setup

Coding assistant + web researcher, each with model routing and toolsets.

Read more →
[ guide ]06

Installer + Live ISO

Deploy to disk with the install wizard, or boot agents entirely in RAM from USB — no install, no trace.

Read more →
[ reference ]07

tentaflake-auditd

Go daemon — fsnotify watcher, debounce, SQLite (WAL), event model. Read by tentaflake top (TUI) and the Agent Console web UI.

Read more →
[ guide ]08

Tailscale Networking

Reach agents on the tailnet with SSH — exposed to nothing else.

Read more →
[ guide ]09

Operator Shell & tentaflake top

SSH into a Tentaflake host — tentaflake CLI, login banner, zsh/tmux/zoxide, tentaflake stats fleet dashboard, and tentaflake top live TUI dashboard.

Read more →
[ guide ]10

OpenCode over HTTP

Drive an agent from n8n, CI or cron — POST /session, then post the task. Credentials, tailnet publishing, and the basic-auth requirement.

Read more →
$ tentaflake — common commands [ .SH ]
$ nix flake check # validate the flake
$ sudo nixos-rebuild switch --flake .#tentaflake # deploy
$ sudo nixos-rebuild switch --rollback # roll back
$ tentaflake agent add # add an agent — interactive wizard, no Nix
$ tentaflake agent list # list configured agents (from agents.json)
$ tentaflake agent set-model coding # change an agent's model
$ tentaflake ps # list agent containers
$ tentaflake # show agent health table
$ tentaflake stats # fleet dashboard — CPU, PIDs, memory per agent
$ tentaflake --hide # redact host name, IP + agent names — screenshot-safe
$ tentaflake top # live TUI activity dashboard
$ tentaflake doctor # deep host health check (nonzero exit on problems)
$ tentaflake rebuild # apply the system config (nixos-rebuild switch)
$ tentaflake update # update flake inputs, review, then rebuild
$ tentaflake console # Agent Console URL + tailnet publish one-liner
$ tentaflake backup coding # snapshot an agent's state dir to ./
$ tentaflake logs coding # follow an agent's logs
$ tentaflake restart coding # restart an agent
$ tentaflake shell coding # open shell inside agent container
[ 07 / 08 ] · ROADMAP
// roadmap //

Where we are — and where we're going

Development is issue-driven, not a fixed schedule — releases land when the work is ready and often mix themes. v0.2.0 made the host agent-agnostic (tentaflake CLI + ZeroClaw); v0.3.1 shipped on 2026-07-19 with the security & ops hardening batch and a third runtime, OpenCode. Since then every merge to main auto-tags a patch release — v0.3.4 is current, with the fleet stats dashboard and screenshot-safe --hide. Here's what's shipped and what's ahead.

v0.1.1
shipped
[ SHIPPED ]Everything on this site
Agent isolation model
Docker containers per agent
16 NixOS modules
Piper TTS server
Operator shell (zsh/tmux/aliases)
tentaflake top TUI dashboard
Installer feature checklist
Tailscale + SSH module
tentaflake-auditd Go daemon
Bootable installer ISO
Live agent ISO (runs in RAM)
mkHermesAgent function
v0.2.0
shipped
[ SHIPPED ]Agent-agnostic host — tentaflake CLI + ZeroClaw runtime — PR #34 (merged)
tentaflake operator CLI (multi-runtime)
mkZeroClawAgent — ZeroClaw runtime
Dual-runtime my-agents.nix
Audit attribution across runtimes
Agent Console web UI (read-only)
Secrets-excluded file explorer
Live activity feed (SSE)
hive-research MCP module (host-side)
v0.3.1
shipped
[ SHIPPED ]Security & ops hardening, plus OpenCode as a third runtime — changelog
Agenix encrypted secrets + rotation guide
SSH hardening + fail2ban (opt-in ssh.nix)
Container defaults — no-new-privileges, pids-limit
Kernel hardening — sysctls, cmdline, LSM order
Nix daemon hardening — strict sandbox, allowed-users
tentaflake-auditd daemon hardening
CI/CD security pipeline — CodeQL, gitleaks
nftables egress filtering (opt-in)
Hardened systemd serviceConfigs (piper-tts)
Git hygiene — signing + signed tags
OPSEC docs — incident response, backup/restore
CLI: doctor · rebuild · update · console · backup
mkOpenCodeAgent — OpenCode runtime over HTTP
Enforced digest pinning on all three runtimes
Released 2026-07-19 · tagged v0.3.1
v0.3.4
shipped
[ SHIPPED ]Fleet stats & screenshot-safe ops — patch releases v0.3.2–v0.3.4, auto-tagged per merge — changelog
tentaflake stats — fleet CPU / PIDs / memory dashboard
Per-agent memory column in the login banner
--hide / -H redaction — screenshot-safe, self-tested
Auto patch tag on every merge to main
DCO enforcement — Signed-off-by required on PRs
Fixes — auditd timestamp index, Hermes seed perms
Released 2026-07-26 · tagged v0.3.4
open issuestracked on GitHubView all issues →
[ FAQ ] · COMMON QUESTIONS
// faq //

Questions, answered

What's the difference between the Hermes, ZeroClaw and OpenCode runtimes?
All three are AI agents that run as isolated containers on your machine. Hermes is the default runtime — a local assistant tentacle with a gateway, ideal for coding and everyday tasks. ZeroClaw is an autonomous runtime that publishes its own gateway for research and worker-style agents. OpenCode runs headless behind a documented OpenAPI 3.1 interface, so an external orchestrator — n8n, CI, cron — drives it over HTTP: POST /session, then POST /session/<id>/message. Run any mix on one host; each gets its own container, 0700 state directory, and secrets. All three are upstream projects — tentaflake runs them as digest-pinned container images and does not implement the agents itself.
Do I need to know Nix to use tentaflake?
No. Pick a path: boot the live ISO to try agents in RAM with zero install, run the guided installer to deploy to disk, or — if you're already on NixOS — add tentaflake as a flake input. You only touch Nix when you want to customize, and an agent definition is a few lines.
How isolated are the agents, really?
OS-level, not just a folder. Each agent gets its own 0700 state directory, its own container, and its own agenix-encrypted secrets, and Hermes agents additionally get a dedicated Linux user — real per-agent separation, not shared processes in one compose file. Or run teams in one container via agent profiles when you want them to share resources.
Does it work without the cloud or any third party?
Yes. tentaflake runs entirely on your own hardware — no cloud control plane, no third-party host, no lock-in. Agents can even run fully in RAM from a USB stick; pull the drive and every trace is gone. You bring your own model keys (or run local models); nothing else phones home.
Is tentaflake free and open source?
Yes — MIT licensed and on GitHub. It's a community template: fork it, keep it generic, add your own agents, and encrypt your secrets with agenix.
[ 08 / 08 ] · SHIP IT

Fork it. Boot the ISO.
Declare your fleet.

A community template — keep it generic, add your agents, encrypt your secrets with agenix. MIT licensed.

★ Star on GitHubBack to top ↑