Commit Graph
417 Commits
Author SHA1 Message Date
m3tam3re cf1c4b9f31 Merge pull request 'fix(t3code): gitea SSH im Service HOME-unabhaengig machen' (#29) from fix/t3code-ssh-hardening into master
Reviewed-on: #29
2026-10-31 16:46:02 +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
m3tam3re cae0e33625 Merge pull request 'feat(m3-hermes): T3 agent runtime — agent-lib skills + gitea as m3ta-chiron' (#28) from feat/t3code-agent-lib-gitea into master
Reviewed-on: #28
2026-10-31 15:59:27 +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
m3tam3re bfd45b81ef Merge pull request 'fix(m3-hermes): firewall.service failed — ip46tables cannot parse IPv4 CIDR' (#27) from fix/firewall-ip46tables into master
Reviewed-on: #27
2026-10-31 13:26:56 +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
m3tam3re 4e6a193d00 Merge pull request 'feat(m3-hermes): T3 Code cockpit — t3 serve systemd service, mesh-only' (#26) from feat/t3code-cockpit into master
Reviewed-on: #26
2026-10-31 12:12:53 +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
m3ta-chiron e965490e66 chore: flake update 2026-10-31 10:59:27 +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 162f12814a chore(ai-memory): consolidate with glm-5-turbo
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>
2026-10-25 14:23:45 +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 c2601d5e70 chore(ai-memory): drop one-shot initial root password from server secret
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 13:56:13 +01:00
m3ta-chiron 3276020422 Merge feat/ai-memory: central ai-memory server, Hermes wiring, kratos client 2026-10-25 13:55:25 +01:00
m3tam3reandClaude Fable 5.1 3ce4eb74bd chore: bump m3ta-home (session-aware Claude MCP bridge)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 13:36:08 +01:00
m3tam3reandClaude Fable 5.1 919ea49a1e chore: bump m3ta-home (ai-memory client module)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 13:31:55 +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 35a0a45977 chore: flake update 2026-10-24 10:01:39 +02:00
m3ta-chiron 8ae524739f chore: flake update 2026-10-22 14:56:23 +02:00
m3ta-chiron 2b2579c2f5 chore: flake update 2026-10-11 16:46:22 +02:00
m3tam3re 6e348eae44 Merge pull request 'feat(m3-hermes): herdr sandbox user + fleet runtime service (R2)' (#25) from feat/herdr-sandbox into master
Reviewed-on: #25
2026-10-11 15:59:54 +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 615d210c6c flake: lock m3ta-home to a660e92 (z.ai coding plan provider) 2026-09-25 08:20:22 +02:00
m3ta-chiron ae1947a998 flake: lock m3ta-home to 800a356 (paperclip Install.WantedBy) 2026-09-25 08:13:16 +02:00
m3ta-chiron c7649931bf flake: lock m3ta-home to 118f324 (paperclip wantedBy fix) 2026-09-25 08:10:01 +02:00
m3ta-chiron eadaf80024 flake: lock m3ta-home to e8fb6be (declarative paperclip service) 2026-09-25 08:08:56 +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 4a5c431bff revert(opencode): stay on v1 line (1.18.32) due to v2 config issues
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.
2026-09-24 13:34:54 +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 e2c7cce3b0 fix(overlay): patch font-manager 0.9.4 for gtk4 4.22 Vala errors
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.
2026-08-31 12:37:32 +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 e774b4abd3 chore: refresh m3ta-nixpkgs and m3ta-home input locks
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.
2026-08-31 11:44:58 +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 8e3139b1f1 chore: update hyrpland/dms config 2026-08-09 10:05:08 +02:00
m3ta-chiron 9196256a54 feat: buzz 2026-08-08 17:48:05 +02:00
m3ta-chiron 7adfc8d808 chore: updates 2026-08-02 14:07:24 +02:00