R2 が正本、KV と Cache API が速度層。Workers の Free Tier だけで動く、グローバル分散の Nix binary cache。5 分 cron が請求前に kill-switch を引きます。
{
nix.settings = {
extra-substituters = [
"https://t4ko.pet"
];
extra-trusted-public-keys = [
"nix.t4ko.pet-1:0eRO18L1/5diWYWboKKPTejQGhGCHNITwELiUaX7Kps=%"
];
};
}nixos-rebuild switch でそのまま substituter として利用できます。
高速で安く、署名で安全。Cloudflare の primitives を素直に組んだだけのアーキテクチャです。
narinfo は memory → KV → R2、NAR 本体は Cache API → R2。D1 は read path に一切乗らない。
Ed25519 で署名された .narinfo と zstd 圧縮の NAR を /nar/<hash>.nar.zst で配信。
5 分 cron で R2 / Class A / Class B を監視。80% で warn、95% で 503 を返す kill-switch。
start → ingest × N → finalize。NAR が narinfo に先行し、D1 commit が KV warming に先行する。
narinfo の読みは memory(L0 isolate)→ KV(L1)→ R2(正本)の順。 KV は結果整合、R2 が常に正本です。404 はそのまま client に伝播し、次の substituter に fall-through します。
Read the spec