fix(t3code): run T3 agents as m3ta-chiron on every host

The identity lived in the m3-hermes service and in home-manager session
variables. Neither reaches the T3 desktop app on m3-kratos, so its agents
committed and pushed as m3tam3re. Wrap the T3 packages via an overlay so
everything T3 spawns inherits commit identity and Gitea push auth,
independent of host and launcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
m3ta-chironandClaude Opus 5.5 committed 2026-11-01 13:14:02 +01:00
1 parent a2d226583f
commit d25015bc9d
3 files changed
+80 -30

No files matched your search

+2
View File
@@ -49,6 +49,8 @@
# with allowUnfree). Do NOT flatten to top-level attrs — see
# overlays/default.nix.
inputs.llm-agents.overlays.shared-nixpkgs
# Wraps pkgs.llm-agents.t3code* with the agents' m3ta-chiron identity.
outputs.overlays.t3code-agent-identity
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
+14 -30
View File
@@ -16,12 +16,12 @@
# so no deploy token) into ~/.agents/skills + ~/.config/opencode/*. A
# path unit mirrors skills into ~/.claude/skills for Claude Code
# (port of m3ta-home profiles/sets/coding/agents/claude-skills.nix).
# - Git identity: every harness spawned by `t3 serve` commits as the
# m3ta-chiron bot account — via service env vars, deliberately NOT via
# ~/.gitconfig, so m3tam3re's interactive git on this host is untouched.
# - Git identity and Gitea push auth: m3ta-chiron for every harness spawned
# by T3, baked into the package (overlays/default.nix,
# t3code-agent-identity), so m3tam3re's interactive git is untouched.
# - Gitea SSH: m3tam3re's ssh config pins User gitea + key ~/.ssh/gitea
# (one-time keygen; pubkey added to the m3ta-chiron account) — covers
# git remotes AND git+ssh:// flake inputs. Host key pinned system-wide.
# (one-time keygen; pubkey added to the m3ta-chiron account) for
# interactive use and git+ssh:// flake inputs. Host key pinned system-wide.
#
# One-time interactive steps after deploy (deliberately NOT declarative —
# subscription auth must live in each harness's own credential store and
@@ -53,16 +53,6 @@
cockpitUser = "m3tam3re";
cockpitHome = "/home/${cockpitUser}";
# Commit identity of the T3 Code agents: the fleet bot account. Env
# vars are respected by git in every process the service spawns; they
# survive restarts and stay out of m3tam3re's dotfiles.
gitIdentityEnv = {
GIT_AUTHOR_NAME = "m3ta-chiron";
GIT_AUTHOR_EMAIL = "m3ta-chiron@agentmail.to";
GIT_COMMITTER_NAME = "m3ta-chiron";
GIT_COMMITTER_EMAIL = "m3ta-chiron@agentmail.to";
};
# SSH to the private Gitea for the T3 lane. Sits in m3tam3re's ssh
# config (per-user — Hermes' own gitea access via its own ssh config
# is unaffected). URL-embedded users (gitea@code.m3ta.dev) match the
@@ -135,21 +125,13 @@ in {
RestartSec = "5";
};
environment =
{
T3CODE_PORT = toString port;
# Deterministic service context: HOME explicit so ssh/git resolve
# ~ in every process this service spawns, however deep t3's
# pty/sandbox chain resets the environment.
HOME = cockpitHome;
# Independent of HOME entirely: git uses exactly this ssh config
# (absolute store path) for every gitea remote.
GIT_SSH_COMMAND = "ssh -F ${t3SshConfig}";
# bd falls back to git's user.name for its audit trail, which would
# be m3tam3re here — keep it in line with the commit identity.
BEADS_ACTOR = gitIdentityEnv.GIT_AUTHOR_NAME;
}
// gitIdentityEnv;
environment = {
T3CODE_PORT = toString port;
# Deterministic service context: HOME explicit so tools resolve ~ in
# every process this service spawns, however deep t3's pty/sandbox
# chain resets the environment.
HOME = cockpitHome;
};
# Harness CLIs, git and the issue tracker for the agents T3 Code spawns.
path = with pkgs; [
@@ -176,6 +158,8 @@ in {
systemd.tmpfiles.rules = [
"d ${cockpitHome}/.ssh 0700 ${cockpitUser} users -"
"L+ ${cockpitHome}/.ssh/config - - - - ${t3SshConfig}"
# The fleet-wide key path the T3 package expects (see t3code-agent-identity).
"L+ ${cockpitHome}/.ssh/m3ta-chiron - - - - ${cockpitHome}/.ssh/gitea"
];
# ── agent-lib v2 client: skills/commands/agents for the harnesses ────