Three-lane agent setup (interactive cockpit / autonomous workers / Hermes
control lane): T3 Code server runs on m3-hermes as a systemd service under
the m3tam3re user, reachable only from the NetBird mesh (direct pairing,
no T3 Connect cloud relay).
- hosts/m3-hermes/services/t3code.nix: t3 serve on port 3773 (port
registry), User=m3tam3re, keyless m3ta-gateway opencode config for
harnesses, claude-code/opencode2 in service PATH
- ports.nix: t3code = 3773
- fix netbirdRange in ai-memory.nix + hermes-dashboard.nix: the fleet
mesh actually runs in 100.81.0.0/16 (wt0 kernel route), the previous
100.64.0.0/16 rules never matched any real peer
One-time steps after deploy (documented in the module header):
sudo -u m3tam3re claude auth login; t3 pair for client devices.
GLM-5.3 spent the structured-call output budget on reasoning and got
truncated (finish_reason=length) on every profile classification.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The native hook command reads <data_dir>/auth-token, not the config's
bearer_token_file; without it every Hermes event was spooled with a 401.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Server: services.ai-memory (upstream NixOS module, llm-agents build) on
m3-hermes, bound to the Netbird range, LLM consolidation via z.ai GLM,
one global cross-project profile, auto-improve proposals gated behind
approval. Traefik on m3-atlas publishes it as memory.m3ta.dev.
Clients: per-host aim_ keys (user "sascha", labels kratos / hermes /
az-lt-nix) as agenix secrets. m3-kratos enables m3ta-home's
coding.aiMemory with the AZ checkouts routed to the "az" workspace.
Hermes: lifecycle hooks, MCP bridge and skills wired declaratively, a
home-workspace marker ("home"/"assistant"), and Honcho replaced by the
built-in notes so ai-memory is the single shared memory.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- System-User herdr (isSystemUser, /var/lib/herdr, homeMode 750) ohne Fleet-Keys
- systemd herdr-server: User=herdr, StateDirectory 0750, RuntimeDirectory 0700,
herdr aus llm-agents.herdr (gepinnt über Flake), path= statt PATH-Env
- moshi-hook-herdr Service mit ConditionPathExists (startet erst nach dem
einmaligen imperativen moshi-hook-Install für den herdr-User)
- Worker-opencode-Config auf keyless m3ta-gateway (NetBird Agent Network,
Budget-Deckel liegt in der NetBird-Policy)
- Genau EINE Sudo-Regel abwärts: hermes -> herdr, nur /run/current-system/sw/bin/herdr-run *
(Whitelist: agent|pane|workspace|status|integration)
Eval verifiziert: serviceConfig.User=herdr, home, sudo-Rule, tmpfiles, ConditionPathExists.
Closure-Build vor dem Merge ausfuehren (s. PR-Beschreibung).
- m3ta-home: point back at ssh remote (drop local path override) and
update lock to 8987758, which removes the dankBatteryAlerts plugin
enable (plugin was removed from dms-plugin-registry because battery
alerts are builtin to DMS stable now; the dangling enable left
plugins.dankBatteryAlerts.src undefined and broke evaluation)
- nix.nixPath -> nix.settings.nix-path (option was renamed/removed)
- media profile: enable graphics profile flag
Validated via nix build --dry-run of m3-kratos toplevel (eval OK,
367 derivations pending).
Colmena connects with BatchMode=yes and no TTY (src/nix/host/ssh.rs),
so a sudo password prompt can never be answered - non-root deploys
REQUIRE NOPASSWD. New extraServices.colmenaDeploy (enabled on all
five hosts) grants m3tam3re passwordless sudo for exactly the two
invocations colmena performs (verified against colmena 0.5/0.6
profile.rs + host/{ssh,local}.rs, default NixFlags are empty):
- /run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set /nix/store/*
(system profile switch, goals switch/boot)
- /nix/store/*/bin/switch-to-configuration <boot|switch|test|dry-activate>
(activation, exact single argument)
Everything else keeps requiring the sudo password; extraRules sort
after the wheel rules, so last-match-wins keeps the exception scoped.
Also enables passwordless 'colmena apply-local' on the desktops, which
uses the same activation path.
Residual risk (documented in the module): anyone holding the deploy
user's SSH key can activate arbitrary store closures - that is the
deploy capability itself, inherent to NixOS remote activation.
One-time bootstrap per server (rules arrive WITH a deploy, and the
first deploy cannot answer a password prompt):
nixos-rebuild switch --flake .#m3-atlas --target-host m3tam3re@m3-atlas --use-remote-sudo
The hermes-agent v2026.9.24 activation snippet deep-merges Nix settings
into the runtime-writable /var/lib/hermes/.hermes/config.yaml via a bare
yaml.safe_load() with no error handling. The runtime corrupted the file
(plugin-enable appended '- moshi-hooks' at mapping-level indent), so
every nixos-rebuild switch failed with yaml.parser.ParserError inside
'hermes-agent-setup'.
- Add hermes-config-quarantine activation snippet that validates the
YAML first and moves unparsable files aside (config.yaml.corrupt-*)
so activation regenerates a clean config from Nix settings instead
of blocking system updates. Wired before hermes-agent-setup via deps
list merge; reuses the upstream merge script's python+pyyaml env.
- Declare plugins.enabled (herdr-agent-state, moshi-hooks) in Nix
settings so plugin state survives a quarantine-and-regenerate.
Host file was repaired manually on m3-hermes (backup kept as
config.yaml.corrupt-20261004).
m3ta-home 5e91e5c removed the agent-lib input and its lib.mkHermesSkillsDir
re-export. Finish the removal on our side:
- add agent-lib (agent-lib-legacy on gitea) as a direct flake input,
pinned to the same rev m3ta-home used before (75a2ed2)
- call inputs.agent-lib.lib.${system}.mkHermesSkillsDir directly in
hosts/m3-hermes/services/hermes-agent.nix
- bump m3ta-home to dfe148d (drops the dangling pkgs.agent-lib reference
that broke evaluation of every coding-set host)
nix flake check: all checks passed.
- overlays/ai-agents: pin opencode-desktop to llm-agents.opencode2-desktop
(2.0.16) — the v2 desktop app now exists upstream. Comments claiming
no v2 desktop existed are outdated; v2 also normalizes the v1 config
format internally, so m3ta-home's settings work unchanged.
- m3-hermes: llm-agents.opencode -> llm-agents.opencode2 (hermes-agent
only references opencode as a model-provider API, not the CLI binary)
- flake: update llm-agents (brings opencode2-desktop + paperclip),
re-lock m3ta-home to master (git+ssh) after its opencode2 migration
- flake.nix: restore documented git+ssh URL for m3ta-home after local
iteration; align hermes-agent URL with locked v2026.8.31
opencode2 had config compatibility problems with m3ta-home's
programs.opencode settings. Pin top-level opencode to llm-agents'
v1 package (1.18.32) instead — still newer than nixpkgs' 1.18.30.
opencode-desktop pin (1.18.32 from llm-agents) unchanged.
- new ai-agents overlay (applied after m3ta-nixpkgs, which re-exports
opencode-desktop from its own older v1 flake input):
* opencode -> llm-agents.opencode2 (2.0.16), binary renamed back to
'opencode' so keybinds/wrappers keep working
* opencode-desktop -> llm-agents.opencode-desktop (1.18.32, newest
existing desktop release; no v2 desktop app upstream)
- bump llm-agents lock to 8bec0ce1 (opencode2 2.0.16)
- m3-hermes keeps llm-agents.opencode (v1) for now
font-manager 0.9.4 fails to compile against gtk4 4.22: the
Gtk.DragIcon.get_for_drag binding changed in the gtk4 vapi, producing
'use new operator' errors in Collections.vala and FontList.vala that
broke home-manager-path for all desktop hosts.
0.9.4 is the latest upstream release (master unfixed too); the fix is
upstream PR FontManager/font-manager#468, already carried by nixpkgs
master but predating our locked nixpkgs and nixpkgs-master inputs.
Vendor the patch as an overlay mod, following the aardvark-dns pattern.
Drop once the nixpkgs lock carries it.
Drop the custom mkLlmAgentsOverlay factory (172 top-level attrs +
17-entry blocklist guarding against nixpkgs clobbering — the source of
the webcord buildNpmPackage and fetchPnpmDeps stack overflows).
Apply inputs.llm-agents.overlays.shared-nixpkgs directly instead. It
exposes everything under the pkgs.llm-agents.* namespace and clobbers
nothing, so the blocklist becomes unnecessary. Packages stay built
against this system's nixpkgs (allowUnfree), which qmd.override
cudaSupport in the m3-ares NVIDIA specialisation requires.
Consumers switched to namespaced refs:
- hosts/m3-hermes/services/hermes-agent.nix: herdr, opencode, qmd
- m3ta-home agents.nix (input bumped): agent-browser, beads, herdr,
qmd, openspec — unqualified refs would now silently resolve to
outdated nixpkgs attrs (opencode 0.3.x) or vanish.
openspec pass-through dropped from m3ta-nixpkgs (input bumped):
llm-agents is the single source of truth now.
Note: flake.nix/lock carry the pre-existing local path inputs for
m3ta-home and m3ta-nixpkgs (dev state, gitea URLs kept as comments).
Verified: drvPath evals for m3-hermes, m3-atlas, and the m3-ares
NVIDIA specialisation (qmd + CUDA EULA) all pass; statix/deadnix clean.
Propagates the appimage extract fix, the buzz 0.5.20 bump (fixed
rust-overlay), and the libreoffice-stable switch — clears all fixable
evaluation warnings on m3-kratos.
The exported M3_SHELL_TO_NU marker leaked into programs started from
nu (zellij, zed, herdr), keeping their spawned terminals in bash.
Decide via /proc/$PPID/comm instead: interactive bash whose parent is
neither nu nor bash execs into nu; a deliberate 'bash' started from
nu/bash stays bash. Non-interactive bash (ssh command exec, Mosh app
bootstrap, see 765ae15) is still covered by the $- == *i* check.
Default login shell is now bash for all hosts; interactive bash
sessions exec into nushell via /etc/bashrc. A ~/.bashrc sourcing
/etc/bashrc covers non-login interactive shells (terminal emulators).
Non-interactive SSH exec (mosh app bootstrap, scripts) keeps POSIX
shell semantics. Reverts the kratos-host-specific overlay from
765ae15.
The old Android Mosh app discovers mosh-server via POSIX shell idioms
(command -v / type) through the user's login shell. Nushell has no
command/type builtins and which prints a table, so the app reported
'mosh-server Not Found' on kratos (user shell: nu) while working on
hermes (app logs in as bash user).
Fix: use bash as login shell on kratos and exec into nushell for
interactive login sessions via programs.bash.interactiveShellInit.
Non-interactive SSH exec (app bootstrap, Termux mosh) stays in bash
where POSIX semantics work.
Also fixes the stale nh flake path (p/nixos -> p/NIX).
aardvark-dns 2.0.0 has a DNS forwarding bug breaking external name
resolution in podman networks. Pin to 1.17.1 (last 1.x) from
nixpkgs-stable; the nixpkgs podman wrapper picks it up via helpersBin
automatically.