worker: fix assets binding and SPA routes

This commit is contained in:
every.channel 2026-02-16 17:46:32 -05:00
parent 339aef50e0
commit 2e5fb0880f
No known key found for this signature in database
9 changed files with 510 additions and 11 deletions

View file

@ -0,0 +1,48 @@
# ECP-0064: NixOS Module For `ec-node` WebTransport Publisher (Tower)
Status: Draft
## Decision
Ship a first-party NixOS module in this repo that runs `ec-node wt-publish` as one or more `systemd` services.
The module:
- Lives in-repo and is exported from the flake as `nixosModules.ec-node`.
- Builds `ec-node` from this repo via Nix (no mutable checkout required on the target host).
- Accepts a read-only configuration (in Nix) for:
- HDHomeRun identity (either `host` IP/DNS, or `deviceId` with optional LAN discovery).
- A list of broadcasts (name + channel) to publish.
- Relay URL and a small set of `wt-publish` toggles (transcode/passthrough/TLS verify).
`~/Projects/nix` will consume this module as a flake input and enable it on the `conrad-tower` host, deploying with the existing `deploy-flake` workflow.
## Motivation
Tower should run publishing continuously, reproducibly, and without "tmux as an orchestration layer".
NixOS + systemd gives:
- Immutable configuration for the HDHR/relay/channel list.
- Easy deployment/rollback via the existing host flake.
- Restart and journald logs for long-running publishers.
## Scope
In scope:
- Nix packaging for `ec-node` sufficient to run `wt-publish`.
- A module that instantiates a `systemd` unit per broadcast.
- Optional HDHR host resolution via device-id + local network discovery (best-effort).
Out of scope (defer):
- ABR/multi-variant ladders from Nix config.
- Automatic lineup-based channel selection by callsign.
- Secrets management (publisher doesn't require secrets for Cloudflare relay preview).
## Rollout / Reversibility
- Enabling the module is per-host.
- Reversible by removing the module import and disabling the service(s); roll back with the existing deployment tooling.