Commit Graph
227 Commits
Author SHA1 Message Date
m3tam3re d4cc6d80d8 Merge branch 'fix/m3-kratos-t3code-firewall' 2026-11-01 13:27:48 +01:00
m3tam3re 0c52f97bde Merge branch 'fix/t3code-gitea-provider' 2026-11-01 13:27:48 +01:00
m3tam3reandClaude Opus 5.5 ee0a8908d0 feat(m3-kratos): allow T3 Code port from the NetBird mesh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:26:53 +01:00
m3tam3reandClaude Opus 5.5 5a66da916d fix(t3code): recognize code.m3ta.dev as Gitea for change requests
T3 only detects a Gitea on a custom domain through a matching tea or fj
login, so creating a change request failed with "No unknown source control
provider is registered". Put tea on T3's PATH with an m3ta-chiron login built
at runtime from the hermes-gitea-token agenix secret.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:24:11 +01:00
m3tam3re 8a9fb31c9a chore: remove fish shell from host configs
- Drop fish.enable from the desktop, portable, and server shell profiles in hosts/common/users/m3tam3re.nix
- Remove programs.fish.enable from m3-atlas, m3-helios, m3-hermes, and m3-kratos
2026-11-01 13:19:03 +01:00
m3ta-chironandClaude Opus 5.5 d25015bc9d 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>
2026-11-01 13:14:02 +01:00
m3tam3reandClaude Opus 5.5 a2d226583f fix(t3code): provide Beads to T3 Code agents on m3-hermes
bd was neither on the t3code service PATH nor on the system. Add it to
both, like the harnesses, and set BEADS_ACTOR so the audit trail matches
the m3ta-chiron commit identity.

Also take the bd 1.3.2 migration of .beads (config, gitignore, hooks) and
ignore the .beads.gate.lock it creates in the repo root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:09:34 +01:00
m3ta-chiron 56f2295e6e fix(t3code): make gitea SSH access HOME-independent in the service
The T3 threads could clone from gitea interactively (m3tam3re terminal)
but not from the t3code service context. Instead of guessing which link
in the spawn chain drops HOME, make every link irrelevant:

- t3SshConfig: absolute IdentityFile (no ~ resolution needed)
- service env: HOME set explicitly + GIT_SSH_COMMAND pointing at the
  absolute store-path ssh config — git uses exactly this config for
  gitea remotes regardless of HOME or user ssh-config lookup

Verified via nix eval: HOME=/home/m3tam3re and
GIT_SSH_COMMAND=ssh -F /nix/store/...-t3-gitea-ssh-config land in the
unit. After deploy: systemctl restart t3code, then retrigger the clone
thread.
2026-10-31 16:44:15 +01:00
m3ta-chiron 95f5b76629 chore: fix agent-prod 2026-10-31 16:20:18 +01:00
m3ta-chiron e3c3823a46 feat(m3-hermes): T3 agent runtime — agent-lib skills + gitea as m3ta-chiron
- agent-lib v2 client: /etc config + timer sync (2h/on-boot) as m3tam3re,
  deploys work repo into ~/.agents/skills + ~/.config/opencode/*
- Claude Code skills mirror (system path unit, port of m3ta-home
  claude-skills.nix)
- git identity m3ta-chiron via t3code service env (no ~/.gitconfig hijack)
- gitea SSH for m3tam3re (User gitea, key ~/.ssh/gitea) + host key pinned
  system-wide; one-time keygen steps documented in module header
2026-10-31 15:23:58 +01:00
m3ta-chiron d8239fcd32 fix(m3-hermes): firewall — interface match instead of IPv4 CIDR in ip46tables
The mesh-only accept rules used 'ip46tables ... -s 100.x/16'. ip46tables
runs every rule through iptables AND ip6tables; ip6tables cannot parse an
IPv4 CIDR and aborts with 'host/network not found', failing the whole
firewall.service (status 2).

Consequence beyond the unit failure: the firewall-start script aborted at
the first such rule, so the trailing default-reject rules were never
applied — the input filter was effectively OPEN (only SSH/established
rules had been added). This also explains why the mesh services were
reachable although the previous 100.64.0.0/16 source rule never matched
any peer.

Fix: match on the NetBird interface (-i wt0) instead of a source range —
family-agnostic, survives NetBird range changes, and matches the idiom
the generated script already uses for NetBird service ports. Applied to
ai-memory, hermes-dashboard and t3code rules (add + stop-commands).

After deploying: firewall.service completes, default-reject applies, and
49374/9119/8642/3773 become reachable from the mesh ONLY (previously
open to everyone). Anything that silently relied on the open filter will
start failing — that is the intended posture.
2026-10-31 13:17:42 +01:00
m3ta-chiron 275546f0ee fix(t3code): drop gateway symlink — subscription login per harness
Subscription auth (Claude Code, OpenCode) must live in each harness's own
credential store; providers do not allow routing subscriptions through
other tools. The keyless m3ta-gateway stays herdr-worker-only. Both
harnesses now login interactively once after deploy (see module header).
2026-10-31 12:12:06 +01:00
m3ta-chiron c310ce57f4 feat(m3-hermes): T3 Code cockpit — t3 serve systemd service, mesh-only
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.
2026-10-31 11:18:49 +01:00
m3tam3reandClaude Fable 5.1 1ca2bf0b94 fix(m3-hermes): restart ai-memory when its secret changes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 14:24:51 +01:00
m3tam3reandClaude Fable 5.1 a45e3e184b fix(m3-hermes): seed ai-memory hook credential for Hermes
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>
2026-10-25 14:02:31 +01:00
m3tam3reandClaude Fable 5.1 f142cc0721 feat(ai-memory): central agent memory server on m3-hermes
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>
2026-10-25 13:01:05 +01:00
m3ta-chiron 8ae524739f chore: flake update 2026-10-22 14:56:23 +02:00
m3ta-chiron b7961b6e4e feat(m3-hermes): herdr sandbox user + fleet runtime service (R2)
- 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).
2026-10-11 15:06:00 +02:00
m3ta-chiron 9f671e334d fix(flake): unbreak m3-kratos build after flake update
- 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).
2026-10-11 14:29:58 +02:00
m3ta-chiron 972a81f367 flake update 2026-10-04 14:01:45 +02:00
m3ta-chiron 0576b3c60b feat(colmena): passwordless activation via sudoers rules scoped to colmena's exact commands
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
2026-10-04 13:42:02 +02:00
m3ta-chiron db0bfbc707 feat(colmena): set up Colmena as deploy tool for all NixOS hosts
- Add colmena flake input (nix-community >= 0.5.0) and CLI to devShell
- Extract shared nixosHosts module map consumed by BOTH
  nixosConfigurations (nixos-rebuild/nh) and the Colmena hive,
  so local rebuilds and remote deploys cannot drift apart
- Add colmenaHive output via colmena.lib.makeHive (direct flake
  evaluation, required on Nix >= 2.21) plus legacy colmena output
- Tags: m3-atlas/m3-helios/m3-hermes = server, m3-ares/m3-kratos =
  desktop with allowLocalDeployment; targetUser m3tam3re
- meta.allowApplyAll = false guards bare 'colmena apply'; use
  'colmena apply --on @server' or 'apply-local' instead
- Document deploy commands in AGENTS.md

Note: colmena builds render system.nixos.version as 26.11pre-git
(colmena's evaluator has no flake sourceInfo) - cosmetic only,
package closures are identical to nixos-rebuild.

Includes pending working-tree changes: hermes-agent bump v2026.9.24,
agent-lib input removal, m3ta-home switched to local path checkout,
m3-kratos monitor setup update, alejandra reformat of rofi-pass.nix.
2026-10-04 13:07:14 +02:00
m3ta-chiron 8a083656eb fix(m3-hermes): survive corrupt hermes runtime config.yaml during activation
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).
2026-10-04 11:09:41 +02:00
m3ta-chiron 872a2656dd fix(hermes): consume agent-lib mkHermesSkillsDir via direct flake input
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.
2026-10-02 08:30:12 +02:00
m3ta-chiron b3f6cad3e2 chore: bump m3ta-home (dms require detection fix) 2026-09-28 18:14:50 +02:00
m3ta-chiron c5043e8044 feat(agents): complete opencode -> opencode2 switch, add paperclip
- 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
2026-09-25 07:44:30 +02:00
m3ta-chiron 839697e21c feat(opencode): pin top-level opencode to v2 from llm-agents
- 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
2026-09-24 12:58:42 +02:00
m3ta-chiron 8f5f3754e5 chore: -mem0 2026-08-31 13:03:44 +02:00
m3ta-chiron ed2f9ba4d2 refactor(llm-agents): replace flattening overlay with upstream shared-nixpkgs
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.
2026-08-31 11:47:17 +02:00
m3ta-chiron 7601583928 fix(shell): exec into nushell by parent process, not env marker
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.
2026-08-31 09:56:13 +02:00
m3ta-chiron 7313e167b1 feat: herdr + agent network over netbird 2026-08-23 14:39:31 +02:00
m3ta-chiron 1ba70151ef refactor(shell): move bash->nushell wrapper to common
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.
2026-08-23 14:35:18 +02:00
m3ta-chiron 765ae1581f fix(kratos): make Android Mosh app work with nushell login shell
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).
2026-08-23 14:24:43 +02:00
m3ta-chiron 1610a5ac7d fix(podman): pin aardvark-dns to 1.17.1 from stable
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.
2026-08-16 12:44:51 +02:00
m3ta-chiron 58fecf72df feat: migrate host Hyprland overrides to Lua 2026-08-01 10:53:09 +02:00
m3ta-chiron 43ce336675 +qmd 2026-07-30 06:46:23 +02:00
m3ta-chiron 673a1908d2 chore: flake update 2026-07-25 14:54:22 +02:00
m3ta-chiron e761d91ab5 chore: update + fix pnpm upstream bug 2026-07-10 15:19:44 +02:00
m3ta-chiron 4d1c4a859b chore: flake update 2026-07-07 19:49:53 +02:00
m3ta-chiron 08c0773472 chore: update 2026-07-05 18:42:20 +02:00
m3ta-chiron 1df2d9576e chore: some updates 2026-06-27 10:27:35 +02:00
m3ta-chiron 879bdb3005 refactor: consume agent-lib through m3ta-home 2026-06-13 09:25:40 +02:00
m3ta-chiron 2a1dbe540a fix: ksnip crash 2026-06-11 09:29:20 +02:00
m3ta-chiron 80c49a6727 chore: pin m3-atlas ghost to version 6 2026-06-09 18:40:25 +02:00
m3ta-chiron 9bceb1c6d0 fix: make inputs self-contained 2026-06-06 13:15:27 +02:00
m3ta-chiron 0519de4f1d chore: m3-are to new ui 2026-06-06 07:54:30 +02:00
m3ta-chiron a87234bd7f +dms 2026-06-02 18:20:43 +02:00
m3ta-chiron a9ffe3ed28 feat: agent-lib exlude agents 2026-05-31 14:10:15 +02:00
m3ta-chiron 6c4e16de3d feat(m3-kratos): enable agent-lib shared skills 2026-05-30 10:01:47 +02:00
m3ta-chiron 23b4e825b1 m3ta-home update 2026-05-29 17:38:20 +02:00