1.5 KiB
1.5 KiB
ECP-0067: Control Transport Resolution And NixOS Control Wiring
Status: Draft
Decision
Add two pieces on top of ECP-0066:
ec-node control-resolve:
- resolve a
stream_idfrom iroh-gossip control announcements, - enforce freshness (
updated_unix_ms+ TTL / max age), - choose transport by policy (
direct-first,relay-first, direct-only, relay-only), - emit machine-readable JSON for automation.
- Extend the
services.every-channel.ec-nodeNixOS module withcontrol.*options that map directly towt-publish --control-announceflags.
Motivation
We already announce relay/direct transport availability, but consumers and deployment automation still need ad-hoc logic to pick a path. control-resolve makes this deterministic and scriptable.
For ops, control announcements should be configured as immutable host state in Nix, not hand-managed CLI flags on each machine.
Scope
In scope:
- New
control-resolvecommand inec-node. - Freshness + transport-preference policy in resolver.
- NixOS module options for control announce enable/ttl/interval/discovery/identity/peers.
Out of scope:
- Browser-native iroh direct transport.
- End-to-end automatic failover execution (resolve + launch subscribe) in one command.
- Cryptographic policy hardening beyond current control-topic trust model.
Rollout / Reversibility
- Additive only: existing relay and direct publish/subscribe paths remain unchanged.
- If needed, disable by not using
control-resolveand leavingservices.every-channel.ec-node.control.enable = false.