- 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
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.
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.
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).
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.
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
- 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
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.
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.
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.