F23: the relay's Nix checks on the hub, version 0.1.0, deploy notes #26
Reference in New Issue
Block a user
Delete Branch "feature/nix-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F23, the relay on the home server, made deployable.
.fabrica/artifex/nix-check.yaml: the package (with the crates' tests) and the VM testrelay-keeps-no-address, on Fabrica's NixOS runner, by hand.flake.nix: the licence is CPAL-1.0 (the repository's since PR #24; the flake still said AGPL/Apache/MIT); the package version is 0.1.0./versionanswers what the tag says..agents/features/home-relay.md: the VM test has run; how to deploy from a tag, check it and roll it back.Runs on the hub: r54ed0gn5tcqs at
f1e1f6e(package 11 min, VM test 10 min, both exit 0) and rmc0pyqnh7cjy at308e639(ok). The self-review is posted below as a review.Self-review of F23's deploy step (adversarial, as CLAUDE.md §3).
Evidence
nixos-vm): r54ed0gn5tcqs atf1e1f6e, with package 681 s exit 0 andrelay-keeps-no-address580 s exit 0; then rmc0pyqnh7cjy at308e639(v0.1.0), ok. The package build runs the crates' own tests (doCheck = true). This is the first time the module and the VM test have been evaluated at all; until now they had only been written.review/planted-caddy-log(8bb6904, on top off1e1f6e) takes the relay host'slogFormat output discardout ofdeploy/nixos/module.nix. Run rk2s549b1b8hk: the package passes, and the VM test fails withgrep -rF '192.168.1.1' /var/log /var/lib/private/tabellarius unexpectedly succeeded. The test catches exactly the leak it exists for. 1/1 caught.Findings
services.caddy. A server whose port 443 belongs to another proxy (nginx) would conflict, and the module has no switch to leave the proxy out. The deploy notes say to proxy by hand, but the module still enables Caddy. Not fixed here: it depends on what .217 runs, which I've asked. If it isn't Caddy, the next PR addsservices.tabellarius.proxy = "caddy" | "none".cleanSource ./.puts.agents/and.fabrica/into the package's source, so a commit that only changes docs gives a different store path. The relay's code is still the tagged code, but two tags with the same code don't build to the same hash, which weakens VERIFY.md's footprint story. Follow-up: a source filter that keeps onlyCargo.*andcrates/.tlsline. Said in the notes for the operator.review/.Not verified: the relay on the real server (no deploy yet); Let's Encrypt (the VM uses Caddy's internal CA).
@@ -66,0 +72,4 @@and `imports = [ tabellarius.nixosModules.default ];`.- **The service:** `services.tabellarius = { enable = true; domain = "<name>"; };` The caps keep their defaults(1 GiB of waiting blobs, 100 000 mailboxes, 10 000 invites); `wake = true` (UnifiedPush wake-ups, F25b).- **The proxy:** the module turns on `services.caddy` with one virtual host. On a server whose Caddy is alreadyFinding 1: this tells an operator with another proxy to proxy by hand, but the module still enables Caddy, so a server with nginx on 443 would get two listeners. A
proxy = "none"switch is the fix if .217 needs it.@@ -66,0 +75,4 @@- **The proxy:** the module turns on `services.caddy` with one virtual host. On a server whose Caddy is alreadythe NixOS module, it is one more host in the same Caddy; a server with another proxy on 443 must proxy thename to `127.0.0.1:8470` itself, with no access log and without `X-Forwarded-For`, `X-Real-IP` and `Forwarded`.- **DNS and TLS:** one A/AAAA name for the relay. Caddy gets its certificate by HTTP-01, so port 80 must reach it.Finding 3: HTTP-01 only. Behind NAT, or with a DNS-01 wildcard certificate, the host needs its own
tlsline. The operator has been told; no code change.@@ -15,3 +15,3 @@pname = "tabellarius";version = "0.0.0";version = "0.1.0";src = pkgs.lib.cleanSource ./.;Finding 2:
cleanSource ./.includes.agents/and.fabrica/, so a docs-only commit changes the package hash. Filter the source down toCargo.*andcrates/in a follow-up, so equal code builds to an equal footprint (VERIFY.md).Merged into main as
1e2eed8(--no-ff; the remote hash was checked). Tagged v0.1.0 on the merge, the tag the home server deploys from.Pull request closed