Commit Graph
215 Commits
Author SHA1 Message Date
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
m3ta-chiron 2a37ea8fbc fix(kratos): launch Hyprland via wrapper from greetd 2026-05-25 09:51:06 +02:00
m3ta-chiron b1fb63c814 fix(kratos): simplify tuigreet login command
Root cause: The complex concatStringsSep command with power commands
(--power-shutdown, --power-reboot) and multiple --remember flags was
causing tuigreet to display its usage/flags instead of the login UI.
The quoting in the systemd binary paths may have been problematic.

Changes:
- Use lib.getExe instead of manual bin path for tuigreet
- Use simple 'Hyprland' command (found via PATH) instead of
  the full start-hyprland path which may have issues
- Remove unverified options: --remember-session, --remember-user-session,
  --user-menu, --user-menu-min-uid, --power-shutdown, --power-reboot
- Keep only verified options: --time, --remember, --asterisks, --cmd
- Update tmpfiles comment to reflect actual requirement

This provides a minimal, stable login that works reliably.
User can reboot to test.
2026-05-25 09:34:01 +02:00
m3ta-chiron 32677cfb40 fix(kratos): replace gdm with greetd/tuigreet login manager 2026-05-25 09:19:08 +02:00
m3ta-chiron 95aaddd8c0 fix: enable Hermes voice STT dependencies 2026-05-23 10:32:11 +02:00
m3ta-chiron 2c8d4da6ff Set Hermes default model to GPT 5.5 2026-05-23 09:19:38 +02:00
m3ta-chiron b49d5c4f72 Optimize Hermes Nix service configuration 2026-05-23 08:55:05 +02:00
m3ta-chiron 1bd78b5de8 Fix Hermes Matrix deps for v2026.5.16 2026-05-23 08:06:01 +02:00
m3ta-chiron 59ada8585f feat(atlas): deploy self-hosted honcho 2026-05-20 20:52:15 +02:00
m3tam3re af08084692 chore: fix git identity for m3-hermes 2026-05-11 19:27:11 +02:00
m3tam3re 4f9944101f chore: optimize hermes 2026-05-11 19:01:17 +02:00
m3ta-chiron a957fd1372 fix(m3-atlas): remove netbird-only middleware from dashboard router
Access control is handled at DNS level — dash.m3ta.dev resolves to
Netbird IP (100.81.142.56) which is unreachable from the public internet.
No need for IP whitelist middleware.
2026-05-11 17:15:16 +02:00
m3ta-chiron fc39e05beb feat: Hermes Dashboard via m3-atlas Traefik with TLS + Netbird-only access
m3-hermes:
- Add --insecure flag (required for 0.0.0.0 bind, safe behind Netbird firewall)
- Update comments to document the Traefik proxy flow

m3-atlas Traefik:
- New service: hermes-dashboard → http://100.81.231.152:9119 (Netbird)
- New router: dash.m3ta.dev with GoDaddy TLS cert
- New middleware: netbird-only (IP whitelist 100.64.0.0/16)

Flow: Browser → dash.m3ta.dev (TLS) → Traefik → Netbird → m3-hermes:9119
2026-05-11 15:53:04 +02:00