diff --git a/.github/actions/nix/action.yml b/.github/actions/nix/action.yml new file mode 100644 index 00000000000..3c920094001 --- /dev/null +++ b/.github/actions/nix/action.yml @@ -0,0 +1,16 @@ +name: Install Nix +description: Install Nix and trust the flake's own nixConfig, which names the nix.moq.dev cache. + +runs: + using: composite + steps: + # Nix ignores a flake's `nixConfig` unless told to accept it, and would then + # rebuild from source everything nixpkgs doesn't serve: ~12 minutes of + # uniffi-bindgen-go alone in every job that enters the dev shell. Accepting + # it keeps flake.nix the only place that names the cache and its key. The + # flake is this checkout, which these jobs already run as code. + - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main + with: + determinate: false + extra-conf: | + accept-flake-config = true diff --git a/.github/actions/setup-packaging/action.yml b/.github/actions/setup-packaging/action.yml index 933dd58e870..16c7f13fd4d 100644 --- a/.github/actions/setup-packaging/action.yml +++ b/.github/actions/setup-packaging/action.yml @@ -4,9 +4,7 @@ description: Install Nix and prepend the .#packaging output bin/ to $PATH. runs: using: composite steps: - - uses: DeterminateSystems/nix-installer-action@00199f951aeb9404028a6e4b95ad42546f73296a # main - with: - determinate: false + - uses: ./.github/actions/nix - name: Build packaging tools from flake shell: bash diff --git a/.github/workflows/alert.yml b/.github/workflows/alert.yml index acf165f40da..6c609297949 100644 --- a/.github/workflows/alert.yml +++ b/.github/workflows/alert.yml @@ -13,7 +13,6 @@ on: # `just gh check` enforces coverage and the exclusions in alert.sh. workflows: - apt-repo - - Cachix - Docker - Interop - moq-c @@ -32,6 +31,7 @@ on: - Release JS - Release Kotlin FFI - Release Kotlin lib + - Release Nix - Release Py - Release Py FFI - Release RS diff --git a/.github/workflows/audio-quality.yml b/.github/workflows/audio-quality.yml index 9bfd006cdde..a21fbad57c6 100644 --- a/.github/workflows/audio-quality.yml +++ b/.github/workflows/audio-quality.yml @@ -43,13 +43,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter; see check.yml. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Replay run: nix develop --command just test audio-quality --replays --enforce diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 1dc53aae603..043fd041a6a 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -1,6 +1,9 @@ name: Cache -# Pushes the dev shell closure that every nix job substitutes. +# Pushes the dev shell closure that every nix job substitutes from nix.moq.dev. +# +# The Nix signing key and the CI bucket's write key live in the `cache-write` +# Environment, which pull requests cannot deploy to (see infra/README.md). # # The Rust build cache is not warmed here: `main` and its merge queue publish # what they compile as they run (see .github/actions/rust-cache). @@ -15,6 +18,7 @@ on: paths: - "flake.nix" - "flake.lock" + # Patches and lockfiles the dev shell builds from. - "nix/**" - ".github/workflows/cache.yml" # Priming the shell by hand, e.g. after a failed push. @@ -35,6 +39,7 @@ jobs: runner: [ubuntu-24.04-arm, ubuntu-latest] runs-on: ${{ matrix.runner }} timeout-minutes: 60 + environment: cache-write steps: - name: Checkout @@ -42,34 +47,21 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter. `nixConfig` in flake.nix is - # untrusted by default, so nix logs "ignoring untrusted flake - # configuration setting 'extra-substituters'" and rebuilds from - # source anything missing from the public nixpkgs cache. That was - # costing 678s per job for uniffi-bindgen-go alone, in every job that - # enters the dev shell. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - - # cachix.yml only fires on release tags and only pushes the tagged - # package, so the dev shell itself was never cached. Anything in it that - # nixpkgs doesn't serve prebuilt (uniffi-bindgen-go, a - # buildRustPackage from a git tag) was therefore compiled from source by - # every job that entered the shell. Push it once here so later jobs - # substitute it instead. - - uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17 - with: - name: kixelated - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - uses: ./.github/actions/nix + # Anything in the dev shell that nixpkgs doesn't serve prebuilt + # (uniffi-bindgen-go, a buildRustPackage from a git tag) would otherwise + # compile from source in every job that enters it. Only paths missing + # from the bucket upload, so this also restores whatever its lifecycle + # rule expired. - name: Cache the dev shell + env: + NIX_SIGNING_KEY: ${{ secrets.NIX_SIGNING_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.NIX_R2_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.NIX_R2_SECRET_ACCESS_KEY }} run: | # `--profile` realises the shell's full build closure, which is what # the runners actually need; `nix build .#devShells...` alone leaves # out the build-time inputs. nix develop --profile /tmp/devshell --command true - cachix push kixelated /tmp/devshell + nix develop --command just infra nix push nix-ci-moq-dev /tmp/devshell diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2c28510e9b3..e63b2aa3da5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -57,19 +57,8 @@ jobs: env: CI_BASE: ${{ github.base_ref == 'release' && '--all' || github.event.merge_group.base_sha }} - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main + - uses: ./.github/actions/nix if: steps.scope.outputs.needed == 'true' - with: - determinate: false - # Trust the flake's cachix substituter. `nixConfig` in flake.nix is - # untrusted by default, so nix logs "ignoring untrusted flake - # configuration setting 'extra-substituters'" and rebuilds from - # source anything missing from the public nixpkgs cache. That was - # costing 678s per job for uniffi-bindgen-go alone, in every job that - # enters the dev shell. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= - uses: DeterminateSystems/flake-checker-action@786422608c7bded2bbc9741ad9f91356842bf520 # main if: steps.scope.outputs.needed == 'true' @@ -122,19 +111,8 @@ jobs: env: CI_BASE: ${{ github.base_ref == 'release' && '--all' || github.event.merge_group.base_sha }} - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main + - uses: ./.github/actions/nix if: steps.scope.outputs.needed == 'true' - with: - determinate: false - # Trust the flake's cachix substituter. `nixConfig` in flake.nix is - # untrusted by default, so nix logs "ignoring untrusted flake - # configuration setting 'extra-substituters'" and rebuilds from - # source anything missing from the public nixpkgs cache. That was - # costing 678s per job for uniffi-bindgen-go alone, in every job that - # enters the dev shell. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= # Reads and writes like the `check` job above. - name: Rust cache diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 997d67725a7..ee54975e068 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -57,18 +57,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter. `nixConfig` in flake.nix is - # untrusted by default, so nix logs "ignoring untrusted flake - # configuration setting 'extra-substituters'" and rebuilds from - # source anything missing from the public nixpkgs cache. That was - # costing 678s per job for uniffi-bindgen-go alone, in every job that - # enters the dev shell. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # The relay, cli, moq-ffi, and moq-c all build from source. The nightly # run publishes them for the pull requests that touch the harness. diff --git a/.github/workflows/moq-c.yml b/.github/workflows/moq-c.yml index 27ef23b56d4..1af49645caf 100644 --- a/.github/workflows/moq-c.yml +++ b/.github/workflows/moq-c.yml @@ -44,14 +44,7 @@ jobs: - name: Install Nix if: matrix.use_nix - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + uses: ./.github/actions/nix - name: Install Rust (Windows) if: '!matrix.use_nix' diff --git a/.github/workflows/moq-gst.yml b/.github/workflows/moq-gst.yml index 6f381372588..0bbe6e8fcc5 100644 --- a/.github/workflows/moq-gst.yml +++ b/.github/workflows/moq-gst.yml @@ -36,14 +36,7 @@ jobs: - uses: ./.github/actions/just - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Parse version id: parse diff --git a/.github/workflows/moq-sh.yml b/.github/workflows/moq-sh.yml index 3196cd289c2..bff42ab4fe1 100644 --- a/.github/workflows/moq-sh.yml +++ b/.github/workflows/moq-sh.yml @@ -68,14 +68,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Deploy env: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9ae1fa4cca8..51a9c7f30dc 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -183,14 +183,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # Writes from `main`, like every Rust cache user there. - name: Rust cache @@ -252,9 +245,7 @@ jobs: with: # Only this main-branch publisher pushes the shared history branch. persist-credentials: true - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false + - uses: ./.github/actions/nix # No dev shell: these recipes need only just, the runner's python3 and git. # Building the shell's uncached tools outlasted this job's timeout. - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8 @@ -334,14 +325,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache with: @@ -375,12 +359,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache with: @@ -426,12 +405,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache with: @@ -603,12 +577,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - uses: ./.github/actions/rust-cache with: access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} @@ -645,14 +614,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Install nightly Rust uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: diff --git a/.github/workflows/obs.yml b/.github/workflows/obs.yml index 6fc532279bb..03df92de9bc 100644 --- a/.github/workflows/obs.yml +++ b/.github/workflows/obs.yml @@ -104,14 +104,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, so the dev shell substitutes - # instead of building from source. See check.yml for the full story. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # Read only: this runs for `release` alone, and Nightly's `obs ci` row # writes on `main`. The cache holds dev-profile artifacts, which is why diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml index 3c782679d80..aef61c48d6c 100644 --- a/.github/workflows/quest.yml +++ b/.github/workflows/quest.yml @@ -44,14 +44,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, which holds the quest build - # as part of the dev shell closure; see check.yml. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # The whole tree, unscoped: a push has no base to diff against. # diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index eef2b23cc09..9e9fe0b7b69 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -132,14 +132,7 @@ jobs: - uses: ./.github/actions/just - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Parse version id: parse diff --git a/.github/workflows/release-js.yml b/.github/workflows/release-js.yml index d7b2a077f0d..b2305222548 100644 --- a/.github/workflows/release-js.yml +++ b/.github/workflows/release-js.yml @@ -40,14 +40,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does. Without it - # `nix develop` built the dev shell from source, about 13 minutes. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Setup npm registry uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v6 diff --git a/.github/workflows/cachix.yml b/.github/workflows/release-nix.yml similarity index 51% rename from .github/workflows/cachix.yml rename to .github/workflows/release-nix.yml index 0e029232464..0ad7246d56d 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/release-nix.yml @@ -1,4 +1,11 @@ -name: Cachix +name: Release Nix + +# Pushes each released package to nix.moq.dev, so `nix run` on a release tag +# substitutes it instead of building from source. +# +# The signing key and the bucket write key live in the `cache-write` +# Environment, which only `main`, the merge queue, and these tag patterns can +# deploy from. A tag ruleset limits who can create them; see infra/README.md. on: push: @@ -13,22 +20,18 @@ jobs: # Build and push only the package the tag names. The tag prefix # (e.g. moq-relay) is the flake attribute, except moq-cli ships as moq. release: - name: Release (${{ matrix.os }}) + name: Release (${{ matrix.runs-on }}) runs-on: ${{ matrix.runs-on }} + environment: cache-write permissions: contents: read strategy: fail-fast: false matrix: - include: - # `os` is just the cache pin label; keep the existing values stable so - # old pins aren't orphaned. - - os: ubuntu-latest # x86_64-linux - runs-on: ubuntu-latest - - os: macos-latest # aarch64-darwin - runs-on: macos-latest - - os: aarch64-linux - runs-on: ubuntu-24.04-arm + runs-on: + - ubuntu-latest # x86_64-linux + - ubuntu-24.04-arm # aarch64-linux + - macos-latest # aarch64-darwin steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -52,25 +55,17 @@ jobs: [[ "$name" == moq-cli ]] && name=moq echo "name=${name}" >> "$GITHUB_OUTPUT" - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - - - uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17 - with: - name: kixelated - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - uses: ./.github/actions/nix + - uses: ./.github/actions/just - - name: Build and cache + # The release bucket has no lifecycle rule, unlike the CI one, so a flake + # pinned to an old tag still substitutes. + - name: Build and push env: PACKAGE: ${{ steps.pkg.outputs.name }} - OS: ${{ matrix.os }} + NIX_SIGNING_KEY: ${{ secrets.NIX_SIGNING_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.NIX_R2_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.NIX_R2_SECRET_ACCESS_KEY }} run: | nix build ".#$PACKAGE" --print-build-logs - cachix push kixelated ./result - # Pin so released paths are exempt from GC, otherwise a consumer - # pinning a few-weeks-old tag silently falls back to building once - # the cache GCs the path. keep-revisions bounds storage for the - # free plan; the pin name is per package+OS so each platform keeps - # its own last-N releases instead of clobbering the other's. - cachix pin kixelated "$PACKAGE-$OS" ./result --keep-revisions 10 + just infra nix push nix-moq-dev ./result diff --git a/.github/workflows/release-py.yml b/.github/workflows/release-py.yml index a6f2dfa7bec..ec1269bdaff 100644 --- a/.github/workflows/release-py.yml +++ b/.github/workflows/release-py.yml @@ -104,14 +104,7 @@ jobs: VERSION: ${{ steps.version.outputs.version }} run: just gh release pypi-exists moq-rs "$VERSION" - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, as check.yml does, so the dev - # shell is substituted rather than built from source. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Build run: nix develop --command just py package diff --git a/.github/workflows/release-rs.yml b/.github/workflows/release-rs.yml index c3288af3104..ebabfe622f1 100644 --- a/.github/workflows/release-rs.yml +++ b/.github/workflows/release-rs.yml @@ -62,17 +62,7 @@ jobs: token: ${{ steps.generate-token.outputs.token }} # Install Nix for system dependencies (e.g. ffmpeg). - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter. `nixConfig` in flake.nix is - # untrusted by default, so nix logs "ignoring untrusted flake - # configuration setting 'extra-substituters'" and rebuilds from - # source anything missing from the public nixpkgs cache. Entering - # the dev shell costs ~12 minutes of uniffi-bindgen-go without it. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # Read only: `release` is not a writer. Crates publish as # source, so nothing this reads ends up in a release. diff --git a/.github/workflows/ts.yml b/.github/workflows/ts.yml index 5856d250a95..b562c579d02 100644 --- a/.github/workflows/ts.yml +++ b/.github/workflows/ts.yml @@ -70,12 +70,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache diff --git a/.github/workflows/uring.yml b/.github/workflows/uring.yml index b76de00cacb..80e35e1e788 100644 --- a/.github/workflows/uring.yml +++ b/.github/workflows/uring.yml @@ -46,12 +46,7 @@ jobs: persist-credentials: false fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache diff --git a/.github/workflows/video.yml b/.github/workflows/video.yml index 6ad05a49373..ef6c8fc4937 100644 --- a/.github/workflows/video.yml +++ b/.github/workflows/video.yml @@ -52,14 +52,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, so the dev shell substitutes - # instead of building from source. See check.yml for the full story. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # Playwright's Chromium isn't in the nix devShell. Install it plus its apt # runtime libs (`--with-deps` needs the host package manager); the recipe's diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 995b96b75cd..8d2b94aa1b4 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -84,14 +84,7 @@ jobs: with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - # Trust the flake's cachix substituter, so the dev shell substitutes - # instead of building from source. See check.yml for the full story. - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix # Nightly's call writes on `main`; release pull requests read. - name: Rust cache diff --git a/.github/workflows/x11.yml b/.github/workflows/x11.yml index 952853c9a3d..5544454a065 100644 --- a/.github/workflows/x11.yml +++ b/.github/workflows/x11.yml @@ -38,12 +38,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main - with: - determinate: false - extra-conf: | - extra-substituters = https://kixelated.cachix.org - extra-trusted-public-keys = kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk= + - uses: ./.github/actions/nix - name: Rust cache uses: ./.github/actions/rust-cache with: diff --git a/doc/setup/install.md b/doc/setup/install.md index e653ee24bf5..4b5247a31db 100644 --- a/doc/setup/install.md +++ b/doc/setup/install.md @@ -67,8 +67,9 @@ docker run -i moqdev/moq --help Static binaries for Linux (x86\_64, aarch64), macOS (Apple Silicon), and Windows (x64) are attached to every [GitHub release](https://github.com/moq-dev/moq/releases). The Nix cache at -`kixelated.cachix.org` only holds tagged releases, so the `release` branch -builds from source. +`nix.moq.dev` only holds tagged releases, so the `release` branch builds from +source. Nix asks before trusting it; `--accept-flake-config` says yes for one +command. ## Debian and Ubuntu diff --git a/flake.nix b/flake.nix index 8a8c51cc2d3..0658e6afb08 100644 --- a/flake.nix +++ b/flake.nix @@ -1,19 +1,24 @@ { description = "MoQ - Media over QUIC"; - # Pre-built binaries live in our Cachix cache. Only tagged releases are - # pushed (CI fires on moq-relay-v*, moq-cli-v*, etc.), so pin the flake ref - # to a recent tag to get a hit. The default branch HEAD is not cached and - # builds from source: + # Pre-built binaries live in our binary cache at nix.moq.dev. Of the + # packages, only tagged releases are pushed (moq-relay-v*, moq-cli-v*, etc.), + # so pin the flake ref to a recent tag to get a hit. The default branch HEAD + # builds from source, though its dev shell is cached: # nix run github:moq-dev/moq/moq-relay-v0.12.4#moq-relay --accept-flake-config # # --accept-flake-config opts into the nixConfig below for one command. To - # trust the cache permanently instead, run: cachix use kixelated + # trust the cache permanently instead, add these settings to nix.conf. + # + # The dev shell paths expire 30 days after upload, possibly before a path + # that depends on them; `fallback` builds whatever is missing instead of + # failing the substitution. nixConfig = { - extra-substituters = [ "https://kixelated.cachix.org" ]; + extra-substituters = [ "https://nix.moq.dev" ]; extra-trusted-public-keys = [ - "kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk=" + "nix.moq.dev-1:BZ0DtCypDFv1ESX3hxuB42yc0vitSA1YHojSmVwB5bk=" ]; + fallback = true; }; inputs = { diff --git a/infra/README.md b/infra/README.md index 1f03bca0cb9..80cf774efaa 100644 --- a/infra/README.md +++ b/infra/README.md @@ -9,12 +9,14 @@ infrastructure. | `infra/rpm` | `rpm.moq.dev` | `rpm-moq-dev` | Fedora/RHEL package repository | | `infra/moq-sh` | `moq.sh` | | The `moq` installer script | | `infra/mbx` | | `mbx-moq-dev` | Private Rust build cache for CI | +| `infra/nix` | `nix.moq.dev` | `nix-moq-dev`, `nix-ci-moq-dev` | Nix binary cache | Each worker is a standalone bun package with a `wrangler.jsonc` and a small TypeScript handler. The apt and rpm workers proxy GETs out of the R2 bucket with appropriate `Content-Type` and `Cache-Control` headers for the -file kind. The moq.sh worker serves `install.sh` from its bundle at every path, -with the newest `moq-cli` release filled in as the default version. +file kind, and the nix worker does the same across its two buckets. The +moq.sh worker serves `install.sh` from its bundle at every path, with the +newest `moq-cli` release filled in as the default version. `infra/mbx` has no Worker: CI reaches its bucket directly through mbx's S3 client. @@ -26,6 +28,7 @@ From the repo root: just infra apt deploy just infra rpm deploy just infra moq-sh deploy +just infra nix deploy ``` Each recipe runs `bun install` and `bun wrangler deploy`. The @@ -207,3 +210,93 @@ Or trigger the GitHub Actions workflow manually: gh workflow run apt-repo.yml -f tag=moq-relay-v1.2.3 gh workflow run rpm-repo.yml -f tag=moq-relay-v1.2.3 ``` + +## Bootstrapping the Nix cache + +`nix.moq.dev` serves two buckets as one binary cache. `nix-moq-dev` holds +released packages, pushed by `release-nix.yml` on a release tag, and never +expires. `nix-ci-moq-dev` holds the dev shells `cache.yml` pushes from `main`, +and its lifecycle rule (`infra/nix/lifecycle.json`) deletes each object 30 +days after upload; the next warm re-uploads what it still needs. `flake.nix` +sets `fallback = true` because that expiry can remove a path before one that +depends on it. + +Nix only trusts paths signed by the key in `flake.nix`, so the signing key is +the trust boundary, not the bucket keys. It lives in the `cache-write` +Environment beside one R2 token for both buckets. Only `main`, the merge queue, +and the five release tag patterns can deploy there; anything that can reach +the key can sign any path, so a second Environment for releases would only +guard the bucket. Readers need no secret. + +All of this runs once, by a maintainer, in this order. All five steps are +done. + +1. **Restrict the release tags.** Anyone with write access can push a tag + today, and `cache-write` admits any commit carrying one. Limit creating, + moving, and deleting them to moq-bot, the GitHub App release-plz tags + with, plus the role the `release` branch ruleset already lets bypass: + + ```bash + gh api -X POST repos/moq-dev/moq/rulesets --input - <<'EOF' + { + "name": "release tags", + "target": "tag", + "enforcement": "active", + "conditions": {"ref_name": {"exclude": [], "include": [ + "refs/tags/moq-relay-v*", "refs/tags/moq-cli-v*", "refs/tags/moq-boy-v*", + "refs/tags/moq-c-v*", "refs/tags/moq-gst-v*" + ]}}, + "rules": [{"type": "creation"}, {"type": "update"}, {"type": "deletion"}], + "bypass_actors": [ + {"actor_type": "Integration", "actor_id": 1039466, "bypass_mode": "always"}, + {"actor_type": "RepositoryRole", "actor_id": 2, "bypass_mode": "always"} + ] + } + EOF + ``` + +2. **Create the buckets and deploy the Worker** under your `wrangler login`: + + ```bash + just infra nix create # both buckets, plus the CI lifecycle rule + just infra nix deploy # nix.moq.dev + ``` + + After editing the rules, `just infra nix lifecycle` applies them. + +3. **Admit the release tags to `cache-write`**, which the Rust build cache + bootstrap created: + + ```bash + for tag in 'moq-relay-v*' 'moq-cli-v*' 'moq-boy-v*' 'moq-c-v*' 'moq-gst-v*'; do + gh api -X POST repos/moq-dev/moq/environments/cache-write/deployment-branch-policies \ + -f name="$tag" -f type=tag + done + ``` + +4. **Create one R2 API token** in the dashboard (R2 -> Manage API tokens -> + Create Account API token) with **Object Read & Write** on `nix-moq-dev` and + `nix-ci-moq-dev` only. Wrangler cannot create R2 tokens. + + ```bash + gh secret set NIX_R2_ACCESS_KEY_ID --env cache-write --repo moq-dev/moq + gh secret set NIX_R2_SECRET_ACCESS_KEY --env cache-write --repo moq-dev/moq + ``` + +5. **Generate the signing key.** This stores it as `NIX_SIGNING_KEY` in + `cache-write` without writing it to disk, and prints the public key: + + ```bash + just infra nix keygen + ``` + + Put the printed `nix.moq.dev-1:...` key in `flake.nix`'s `nixConfig`. + +A job missing its secrets fails rather than skip the push. A job naming an +Environment that does not exist yet creates it with no deployment policy, so +if a workflow ran before the Rust bootstrap, check the policy before adding +secrets. + +To rotate the key, run `keygen` again and add the new public key next to the +old one in `flake.nix`. Drop the old key once nothing signed with it matters: +30 days for CI paths, but never for released ones unless they are re-signed. diff --git a/infra/justfile b/infra/justfile index b10f26352e5..3244cfaa900 100644 --- a/infra/justfile +++ b/infra/justfile @@ -4,9 +4,11 @@ mod apt mod rpm mod moq-sh mod mbx +mod nix # Deploy all infra workers. deploy: just apt deploy just rpm deploy just moq-sh deploy + just nix deploy diff --git a/infra/nix/bun.lock b/infra/nix/bun.lock new file mode 100644 index 00000000000..c360c1dc66d --- /dev/null +++ b/infra/nix/bun.lock @@ -0,0 +1,241 @@ +{ + "lockfileVersion": 1, + "configVersion": 0, + "workspaces": { + "": { + "name": "nix-moq-dev", + "devDependencies": { + "@cloudflare/workers-types": "^5", + "typescript": "7.0.2", + "wrangler": "^4", + }, + }, + }, + "packages": { + "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.5.0", "", {}, "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg=="], + + "@cloudflare/unenv-preset": ["@cloudflare/unenv-preset@2.16.2", "", { "peerDependencies": { "unenv": "2.0.0-rc.24", "workerd": ">1.20260305.0 <2.0.0-0" }, "optionalPeers": ["workerd"] }, "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ=="], + + "@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20261001.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-4cgSgDf28JSw/P5Dj5GCS59hzVqS5XnmGAWNkvYHLI6ODU9idGaMMNEuhJXDkEG/lsABmlVlnCgsdh2VbKWepw=="], + + "@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20261001.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8ulAWruEVouNmEIsQsy9WSSCS9zkLu93W2MTwp5esiFyoPp05BNSVFIFsYSPi1pkFmBBd7fsnwMpbLkaJLaVPQ=="], + + "@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20261001.1", "", { "os": "linux", "cpu": "x64" }, "sha512-kZbTZJGrhsMOdqZ2BIybjaBRLZjYsRLWj7mcNw/6Y3hodOhp5MrNzcz4iWGwNVWwyIV+7Pl+/LX5VcgnRqdHOg=="], + + "@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20261001.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-oOk3Zj6k/8oP0FJgZBWDn7+BqbsqIMEMaV95pulHPVbwVu4wYoLfQq2hp0vkbCNsCFLqZb7cqixXdrwD54ZIow=="], + + "@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20261001.1", "", { "os": "win32", "cpu": "x64" }, "sha512-uRxm5W4VyBkoSaoP1BfOuH0873tE+vxsknF4sab6/5YIRvIAufChq3QDp+zlAn67PuGPGcn7W8QraA0t4ucmOQ=="], + + "@cloudflare/workers-types": ["@cloudflare/workers-types@5.20261004.1", "", {}, "sha512-K9D4/Y6bSIDNYFzjqzFMNoWK99pLgfgFxqSa76kfW++3VCkTSzJbzsQRffir366G3kmNyjoigC6ekp7DxIkxkw=="], + + "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.1", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.1", "", { "os": "android", "cpu": "arm" }, "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.1", "", { "os": "android", "cpu": "arm64" }, "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.1", "", { "os": "android", "cpu": "x64" }, "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.1", "", { "os": "linux", "cpu": "arm" }, "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.1", "", { "os": "linux", "cpu": "ia32" }, "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.1", "", { "os": "linux", "cpu": "x64" }, "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.1", "", { "os": "none", "cpu": "x64" }, "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.1", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.1", "", { "os": "sunos", "cpu": "x64" }, "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.1", "", { "os": "win32", "cpu": "x64" }, "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A=="], + + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.3" }, "os": "darwin", "cpu": "arm64" }, "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.3" }, "os": "darwin", "cpu": "x64" }, "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw=="], + + "@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "os": "freebsd" }, "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.3", "", { "os": "linux", "cpu": "arm" }, "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A=="], + + "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w=="], + + "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.3", "", { "os": "linux", "cpu": "none" }, "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.3" }, "os": "linux", "cpu": "arm" }, "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64" }, "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ=="], + + "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.3" }, "os": "linux", "cpu": "ppc64" }, "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ=="], + + "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.3" }, "os": "linux", "cpu": "none" }, "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.3" }, "os": "linux", "cpu": "s390x" }, "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.3" }, "os": "linux", "cpu": "x64" }, "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" }, "os": "linux", "cpu": "arm64" }, "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.4", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.3" }, "os": "linux", "cpu": "x64" }, "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.4", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA=="], + + "@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.4", "", { "dependencies": { "@img/sharp-wasm32": "0.35.4" }, "cpu": "none" }, "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA=="], + + "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.4", "", { "os": "win32", "cpu": "x64" }, "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], + + "@poppinss/colors": ["@poppinss/colors@4.1.6", "", { "dependencies": { "kleur": "^4.1.5" } }, "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg=="], + + "@poppinss/dumper": ["@poppinss/dumper@0.6.5", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@sindresorhus/is": "^7.0.2", "supports-color": "^10.0.0" } }, "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw=="], + + "@poppinss/exception": ["@poppinss/exception@1.2.3", "", {}, "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw=="], + + "@sindresorhus/is": ["@sindresorhus/is@7.2.0", "", {}, "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw=="], + + "@speed-highlight/core": ["@speed-highlight/core@1.2.15", "", {}, "sha512-BMq1K3DsElxDWawkX6eLg9+CKJrTVGCBAWVuHXVUV2u0s2711qiChLSId6ikYPfxhdYocLNt3wWwSvDiTvFabw=="], + + "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], + + "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="], + + "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="], + + "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="], + + "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="], + + "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="], + + "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="], + + "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="], + + "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="], + + "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="], + + "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="], + + "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="], + + "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="], + + "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="], + + "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="], + + "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="], + + "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="], + + "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="], + + "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="], + + "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], + + "blake3-wasm": ["blake3-wasm@2.1.5", "", {}, "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g=="], + + "cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="], + + "esbuild": ["esbuild@0.28.1", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.1", "@esbuild/android-arm": "0.28.1", "@esbuild/android-arm64": "0.28.1", "@esbuild/android-x64": "0.28.1", "@esbuild/darwin-arm64": "0.28.1", "@esbuild/darwin-x64": "0.28.1", "@esbuild/freebsd-arm64": "0.28.1", "@esbuild/freebsd-x64": "0.28.1", "@esbuild/linux-arm": "0.28.1", "@esbuild/linux-arm64": "0.28.1", "@esbuild/linux-ia32": "0.28.1", "@esbuild/linux-loong64": "0.28.1", "@esbuild/linux-mips64el": "0.28.1", "@esbuild/linux-ppc64": "0.28.1", "@esbuild/linux-riscv64": "0.28.1", "@esbuild/linux-s390x": "0.28.1", "@esbuild/linux-x64": "0.28.1", "@esbuild/netbsd-arm64": "0.28.1", "@esbuild/netbsd-x64": "0.28.1", "@esbuild/openbsd-arm64": "0.28.1", "@esbuild/openbsd-x64": "0.28.1", "@esbuild/openharmony-arm64": "0.28.1", "@esbuild/sunos-x64": "0.28.1", "@esbuild/win32-arm64": "0.28.1", "@esbuild/win32-ia32": "0.28.1", "@esbuild/win32-x64": "0.28.1" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "miniflare": ["miniflare@5.20261001.0-alpha", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.4", "undici": "7.29.1", "workerd": "1.20261001.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" } }, "sha512-GaimS5mSIOMyvd16ga+e1/QkI8cmp3z35QPHFex0DktqNQf2RVZQwMPQXdyoUreUiFP/0Gpe2MoQInTyMAD5xA=="], + + "path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], + + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], + + "sharp": ["sharp@0.35.4", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.4", "@img/sharp-darwin-x64": "0.35.4", "@img/sharp-freebsd-wasm32": "0.35.4", "@img/sharp-libvips-darwin-arm64": "1.3.3", "@img/sharp-libvips-darwin-x64": "1.3.3", "@img/sharp-libvips-linux-arm": "1.3.3", "@img/sharp-libvips-linux-arm64": "1.3.3", "@img/sharp-libvips-linux-ppc64": "1.3.3", "@img/sharp-libvips-linux-riscv64": "1.3.3", "@img/sharp-libvips-linux-s390x": "1.3.3", "@img/sharp-libvips-linux-x64": "1.3.3", "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", "@img/sharp-libvips-linuxmusl-x64": "1.3.3", "@img/sharp-linux-arm": "0.35.4", "@img/sharp-linux-arm64": "0.35.4", "@img/sharp-linux-ppc64": "0.35.4", "@img/sharp-linux-riscv64": "0.35.4", "@img/sharp-linux-s390x": "0.35.4", "@img/sharp-linux-x64": "0.35.4", "@img/sharp-linuxmusl-arm64": "0.35.4", "@img/sharp-linuxmusl-x64": "0.35.4", "@img/sharp-webcontainers-wasm32": "0.35.4", "@img/sharp-win32-arm64": "0.35.4", "@img/sharp-win32-ia32": "0.35.4", "@img/sharp-win32-x64": "0.35.4" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA=="], + + "supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], + + "undici": ["undici@7.29.1", "", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="], + + "unenv": ["unenv@2.0.0-rc.24", "", { "dependencies": { "pathe": "^2.0.3" } }, "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw=="], + + "workerd": ["workerd@1.20261001.1", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20261001.1", "@cloudflare/workerd-darwin-arm64": "1.20261001.1", "@cloudflare/workerd-linux-64": "1.20261001.1", "@cloudflare/workerd-linux-arm64": "1.20261001.1", "@cloudflare/workerd-windows-64": "1.20261001.1" }, "bin": { "workerd": "bin/workerd" } }, "sha512-d/SIYHFO0PT/wiFZg8in4NpRIxYuFwslX1HdylOtWkBIIUmSpkGFhK820cV84XACFylwJ48xuRoWW/8DWDPsPQ=="], + + "wrangler": ["wrangler@4.147.0", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.5.0", "@cloudflare/unenv-preset": "2.16.2", "blake3-wasm": "2.1.5", "esbuild": "0.28.1", "miniflare": "5.20261001.0-alpha", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.24", "workerd": "1.20261001.1" }, "optionalDependencies": { "fsevents": "2.3.3" }, "peerDependencies": { "@cloudflare/workers-types": "^5.20261001.1" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js", "cf-wrangler": "bin/cf-wrangler.js" } }, "sha512-pQYRoiq8PTAxphaG69z8+GC1DkSGd19EDZehQ8zxjo/Ko3mRB6Qs1mTrd8ZuKAarLklIjTqr1lUdCK9r4q2hUg=="], + + "ws": ["ws@8.21.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g=="], + + "youch": ["youch@4.1.0-beta.10", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@poppinss/dumper": "^0.6.4", "@speed-highlight/core": "^1.2.7", "cookie": "^1.0.2", "youch-core": "^0.3.3" } }, "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ=="], + + "youch-core": ["youch-core@0.3.3", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="], + } +} diff --git a/infra/nix/justfile b/infra/nix/justfile new file mode 100644 index 00000000000..4e7095d6b04 --- /dev/null +++ b/infra/nix/justfile @@ -0,0 +1,41 @@ +set fallback + +# Deploy the nix.moq.dev worker. +deploy: + bun install --frozen-lockfile + bun wrangler deploy + +# Create the release and CI R2 buckets and the CI bucket's lifecycle rule. Run once. +create: + bun install --frozen-lockfile + bun wrangler r2 bucket create nix-moq-dev --update-config=false + bun wrangler r2 bucket create nix-ci-moq-dev --update-config=false + just lifecycle + +# Replace the CI bucket's lifecycle rules with lifecycle.json. +lifecycle: + bun install --frozen-lockfile + bun wrangler r2 bucket lifecycle set nix-ci-moq-dev --file lifecycle.json --force + +# Sign store paths and upload them, with their closures, to a nix.moq.dev bucket. +[no-cd] +push bucket +paths: + #!/usr/bin/env bash + set -euo pipefail + # `nix copy` skips any path the bucket already has. + : "${NIX_SIGNING_KEY:?not set; the job needs the cache-write Environment}" + : "${AWS_ACCESS_KEY_ID:?not set}" + : "${AWS_SECRET_ACCESS_KEY:?not set}" + key=$(mktemp) + trap 'rm -f "$key"' EXIT + printf '%s' "$NIX_SIGNING_KEY" >"$key" + nix copy --to "s3://{{ bucket }}?endpoint=dd618f5dbd5da77b8296f1613c301f5c.r2.cloudflarestorage.com®ion=auto&compression=zstd&secret-key=$key" {{ paths }} + +# Generate a signing key into the cache-write Environment and print its public half for flake.nix. +keygen: + #!/usr/bin/env bash + set -euo pipefail + key=$(nix key generate-secret --key-name nix.moq.dev-1) + printf '%s' "$key" | gh secret set NIX_SIGNING_KEY --env cache-write --repo moq-dev/moq + printf '%s' "$key" | nix key convert-secret-to-public + echo diff --git a/infra/nix/lifecycle.json b/infra/nix/lifecycle.json new file mode 100644 index 00000000000..bea0ce7f613 --- /dev/null +++ b/infra/nix/lifecycle.json @@ -0,0 +1,10 @@ +{ + "rules": [ + { + "id": "expire", + "enabled": true, + "conditions": { "prefix": "" }, + "deleteObjectsTransition": { "condition": { "type": "Age", "maxAge": 2592000 } } + } + ] +} diff --git a/infra/nix/package.json b/infra/nix/package.json new file mode 100644 index 00000000000..23b28066691 --- /dev/null +++ b/infra/nix/package.json @@ -0,0 +1,12 @@ +{ + "name": "nix-moq-dev", + "private": true, + "scripts": { + "deploy": "wrangler deploy" + }, + "devDependencies": { + "@cloudflare/workers-types": "^5", + "typescript": "7.0.2", + "wrangler": "^4" + } +} diff --git a/infra/nix/src/worker.ts b/infra/nix/src/worker.ts new file mode 100644 index 00000000000..970bdd53031 --- /dev/null +++ b/infra/nix/src/worker.ts @@ -0,0 +1,73 @@ +// Cloudflare Worker for nix.moq.dev, the project's Nix binary cache. Serves two +// R2 buckets as one cache, written by infra/nix/push.sh through `nix copy`: +// +// nix-moq-dev released packages, kept forever +// nix-ci-moq-dev CI dev shells, expired by a lifecycle rule +// +// /nix-cache-info cache metadata, answered here +// /.narinfo signed path metadata, pointing into nar/ +// /nar/.nar.zst compressed archive, named by its own hash + +interface Env { + RELEASE: R2Bucket; + CI: R2Bucket; +} + +// Priority 41 puts this right after cache.nixos.org (40), so Nix only asks here +// for paths nixpkgs doesn't serve. Answered here rather than from a bucket so +// the two can't disagree. +const CACHE_INFO = "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 41\n"; + +function contentType(key: string): string { + if (key.endsWith(".narinfo")) return "text/x-nix-narinfo"; + if (key.startsWith("nar/")) return "application/x-nix-nar"; + return "application/octet-stream"; +} + +// A NAR is named by the hash of its bytes, so it never changes. A narinfo +// stays short so a path the CI lifecycle rule deletes stops being advertised +// soon after. +function cacheControl(key: string): string { + if (key.startsWith("nar/")) { + return "public, max-age=31536000, immutable"; + } + return "public, max-age=300"; +} + +export default { + async fetch(request: Request, env: Env): Promise { + if (request.method !== "GET" && request.method !== "HEAD") { + return new Response("Method Not Allowed", { status: 405 }); + } + + const key = new URL(request.url).pathname.slice(1); + + if (key === "nix-cache-info") { + return new Response(request.method === "HEAD" ? null : CACHE_INFO, { + headers: { "Content-Type": "text/x-nix-cache-info", "Cache-Control": "public, max-age=3600" }, + }); + } + + if (!key) { + return new Response("MoQ Nix binary cache. See https://moq.dev/setup/install for usage.\n", { + headers: { "Content-Type": "text/plain; charset=utf-8" }, + }); + } + + // Releases first, since they never expire. A NAR is named by its hash, so + // whichever bucket holds it serves the same bytes. + for (const bucket of [env.RELEASE, env.CI]) { + const object = await bucket.get(key); + if (!object) continue; + + const headers = { + "Content-Type": contentType(key), + "Cache-Control": cacheControl(key), + "Content-Length": object.size.toString(), + }; + return new Response(request.method === "HEAD" ? null : object.body, { headers }); + } + + return new Response("Not Found", { status: 404 }); + }, +}; diff --git a/infra/nix/wrangler.jsonc b/infra/nix/wrangler.jsonc new file mode 100644 index 00000000000..3b7c4e50280 --- /dev/null +++ b/infra/nix/wrangler.jsonc @@ -0,0 +1,34 @@ +{ + // Cloudflare Wrangler configuration for the Nix binary cache worker. + // Serves nix.moq.dev from two R2 buckets: released packages, kept forever, + // and CI dev shells, which a lifecycle rule expires. + "$schema": "node_modules/wrangler/config-schema.json", + "name": "nix-moq-dev", + "main": "src/worker.ts", + "compatibility_date": "2025-07-09", + "account_id": "dd618f5dbd5da77b8296f1613c301f5c", + "workers_dev": false, + "route": { + "pattern": "nix.moq.dev", + "custom_domain": true + }, + // R2 bucket bindings + "r2_buckets": [ + { + "binding": "RELEASE", + "bucket_name": "nix-moq-dev", + "remote": true + }, + { + "binding": "CI", + "bucket_name": "nix-ci-moq-dev", + "remote": true + } + ], + // Observability + "observability": { + "logs": { + "enabled": true + } + } +} diff --git a/nix/overlay.nix b/nix/overlay.nix index 494957806e8..d133980e6ad 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -66,7 +66,7 @@ let src = cleanCargoSource; cargoExtraArgs = "-p moq-relay --features jemalloc"; # Enable frame pointers for profiling support (negligible overhead on x86_64). - # This also ensures the CDN build matches what Cachix caches. + # This also ensures the CDN build matches what nix.moq.dev caches. RUSTFLAGS = "-C force-frame-pointers=yes"; # jemalloc's configure uses -O0 test builds, which conflict with # Nix's _FORTIFY_SOURCE hardening (requires -O). @@ -220,7 +220,7 @@ let ''; # The flake output is meant to load against nix's GStreamer (in a - # `nix shell .#moq-gst` / cachix-pulled context). `/nix/store` refs + # `nix shell .#moq-gst` / binary-cache-pulled context). `/nix/store` refs # are correct there. The only thing we fix is the rustc-emitted # self-reference to /nix/var/nix/builds/.../libgstmoq.dylib (the # cargo build dir, gone post-build) which would break loading even diff --git a/quest/m0/audit-perf.md b/quest/m0/audit-perf.md index 474eb12c96a..2b9c10e41ae 100644 --- a/quest/m0/audit-perf.md +++ b/quest/m0/audit-perf.md @@ -42,7 +42,7 @@ Audit evidence (2026-10-19, second checkpoint, incomplete): the full dev shell without the cachix substituter and hit its 15-minute timeout (jobs 117680366708 and 118138225497). This run takes only `just` from the pinned nixpkgs there, and a nightly tooling test requires - every dev-shell job to trust cachix. Pages itself is still off; see + every dev-shell job to trust the Nix cache. Pages itself is still off; see [benchmark trend site](/quest/m2/bench-site.md). Check that `gh-pages` exists and gains a commit per night before comparing against it. - Rust: both the October 18 (`50da59e67`) and October 19 (`ad87ad34e`) diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 6797954bca9..0b0a5133cb6 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -80,6 +80,6 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Pin Quest's gate](/quest/m0/ci/quest-gate-pin.md) - make shared command admission available - [Share local check capacity](/quest/m0/ci/local-gate.md) - gate expensive phases and bound internal fanout - [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - condition: the maintainer bootstrap; then measure hits, restore time, and expiry -- [Nix cache](/quest/m0/ci/nix-cache.md) - `nix.moq.dev` on R2 replaces Cachix for CI and releases +- [Verify the Nix cache](/quest/m0/ci/nix-cache-verify.md) - condition: the `nix.moq.dev` PR merges; then confirm CI and releases use it and retire Cachix - [First shared FFI release](/quest/m0/ci/nightly-ffi-reuse.md) - condition: the first `moq-ffi-v*` tag that runs `Release FFI`, and a `Shipping sizes` run; verify the wrappers and size keys - [Faster runners](/quest/m0/ci/runners.md) - pick hosted, Blacksmith or the NixOS desktop from measurements of the optimized queue diff --git a/quest/m0/ci/audit.md b/quest/m0/ci/audit.md index bfff28efcfe..1538ae92e5e 100644 --- a/quest/m0/ci/audit.md +++ b/quest/m0/ci/audit.md @@ -49,8 +49,8 @@ before and after: queue. - **Dev shell:** `nix develop` downloads for 52 s (p90 90 s) in every job, even ones that compile no Rust. That overlaps with - [the Nix cache](/quest/m0/ci/nix-cache.md); measure what is still slow - once it lands. + [the Nix cache](/quest/m0/ci/nix-cache-verify.md); measure what is still + slow once it lands. - **Waste in the dependency graph:** both rustls backends (ring from moq-quic's default `rustls-ring`, aws-lc-rs from rustls, str0m, jsonwebtoken, rcgen and object_store), and aws-lc-sys recompiling 3 to 5 times per cold job because diff --git a/quest/m0/ci/mbx-r2-verify.md b/quest/m0/ci/mbx-r2-verify.md index 65a8bc6084d..5949b924ec7 100644 --- a/quest/m0/ci/mbx-r2-verify.md +++ b/quest/m0/ci/mbx-r2-verify.md @@ -27,4 +27,4 @@ closes this: ## Related - [Require the release gates](/quest/m0/ci/release-gates.md) - the macOS and Windows jobs this cache serves -- [Nix cache](/quest/m0/ci/nix-cache.md) - the same R2 and Environment bootstrap for Nix +- [Verify the Nix cache](/quest/m0/ci/nix-cache-verify.md) - the same R2 and Environment bootstrap for Nix diff --git a/quest/m0/ci/nix-cache-verify.md b/quest/m0/ci/nix-cache-verify.md new file mode 100644 index 00000000000..60aae1f4f35 --- /dev/null +++ b/quest/m0/ci/nix-cache-verify.md @@ -0,0 +1,34 @@ +# [S] Verify the Nix cache + +## Goal + +Condition: the PR that wired `nix.moq.dev` into CI has merged. The maintainer +ran the bootstrap in `infra/README.md` on 2026-10-19 and 2026-10-20 (the +release tag ruleset, both buckets and the Worker, the `cache-write` +Environment's tag policies and secrets, and the signing key). Check it with +`curl https://nix.moq.dev/nix-cache-info` and +`gh run list --workflow cache.yml --branch main`. + +Then confirm it, and record the numbers in the PR that closes this: + +- The first `main` warm pushes the dev shell, and a later merge queue or + Nightly job enters `nix develop` without compiling uniffi-bindgen-go. The + baseline, measured 2026-10-16 in Nightly run 38897397428: every workload + spent 12-14 minutes building `uniffi-bindgen-go`, `uniffi-bindgen-cpp` and + `quest` before entering the dev shell, because Cachix had no copy. +- The next `moq-relay-v*` or `moq-cli-v*` tag pushes from all three + `release-nix.yml` legs, and `nix run github:moq-dev/moq/#moq-relay + --accept-flake-config` substitutes on a clean machine. +- Dev shell upload time and both bucket sizes after a month, against the + 30-day expiry in `infra/nix/lifecycle.json`. A path expires 30 days after + its upload even while CI still reads it, and only the next warm restores + it, which runs on a flake or `nix/**` change or a dispatch. Look for jobs + that fell back to source builds in that window. If they recur, add a daily + schedule to `cache.yml` (and alert on its scheduled failures) or switch to + a closure-aware collector (niks3). +- Delete the `CACHIX_AUTH_TOKEN` secret and the `kixelated` Cachix cache once + the maintainer decides downstream flakes have had long enough to switch. + +## Related + +- [CI cost and latency](/quest/m0/ci/README.md) - the R2 and Environment decisions this verifies diff --git a/quest/m0/ci/nix-cache.md b/quest/m0/ci/nix-cache.md deleted file mode 100644 index f2fddf82333..00000000000 --- a/quest/m0/ci/nix-cache.md +++ /dev/null @@ -1,41 +0,0 @@ -# [M] nix.moq.dev replaces Cachix - -## Goal - -`https://nix.moq.dev` is the project's Nix binary cache, served from R2. CI -jobs substitute the dev shells from it, release workflows push the released -packages to it, and `flake.nix` and every workflow name it instead of -`kixelated.cachix.org`. Only workflows on `main` or a release tag can sign -and push. - -## Plan - -- Cachix's open-source plan is 5 GB and evicts the oldest paths, which the - dev shell closures plus three-platform release builds outgrow. R2 has no - such cap and no egress charge. -- Nix verifies signatures, so the signing key, not the bucket key, is the - trust boundary. Keep it and the bucket key in GitHub Environments that - `main` and the release tags can deploy from, and nothing else. Release tags - are unprotected today (no tag ruleset), so restricting who can create them - comes first; a separate release Environment from mbx's `cache-write` is fine. A - leaked bucket key cannot make a client accept a path. -- Serve the bucket like apt and rpm: a Worker in `infra/nix` with a checked-in - `wrangler.jsonc` and custom domain, cache headers suited to `.narinfo` - (short) and `nar/` (immutable). Bucket and lifecycle are one-time commands - in `infra/README.md`. -- Expiry by object age can delete a dependency before its dependent. Clients - should set `fallback = true` and the warmer re-pushes what it needs; switch - to a closure-aware collector (niks3) only if that proves noisy. -- Downstream flakes that trust `kixelated.cachix.org` for released packages - keep working until they update; decide with the maintainer how long Cachix - keeps receiving release pushes. -- The cache warmer's dev shell push and the Cachix release workflow both move - over. -- Measured 2026-10-16 (Nightly run 38897397428): every Nightly workload - checked spent 12-14 minutes building `uniffi-bindgen-go`, - `uniffi-bindgen-cpp` and `quest` before entering the dev shell. Cachix had - no copy; the warmer's run for that commit had been cancelled. - -## Related - -- [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - the mbx bucket's bootstrap in `infra/README.md` is the pattern; share it, not the bucket diff --git a/rs/moq-gst/scrub.sh b/rs/moq-gst/scrub.sh index 09ec56ad34a..f5024900794 100755 --- a/rs/moq-gst/scrub.sh +++ b/rs/moq-gst/scrub.sh @@ -4,7 +4,7 @@ # the user's system GStreamer instead of the nix copy it was linked # against. Used by build.sh on the tarball / .deb / .rpm release path; # `nix build .#moq-gst` does not run this, so the flake output stays -# usable inside `nix shell` / cachix. +# usable inside `nix shell` / the binary cache. # # Usage: # scrub.sh diff --git a/sh/gh/nightly.test.py b/sh/gh/nightly.test.py index b7b7d761ab6..a0ba8603208 100644 --- a/sh/gh/nightly.test.py +++ b/sh/gh/nightly.test.py @@ -83,14 +83,14 @@ def test_every_cargo_bench_target_runs_nightly(self): for bench in tomllib.loads(manifest.read_text()).get("bench", [])} self.assertEqual(declared - covered, set(), "Cargo bench targets missing from Nightly") - def test_dev_shell_jobs_trust_cachix(self): - # Without the substituter, the dev shell builds uncached tools from source - # and outlasts short jobs: the benchmark site timed out before publishing. + def test_dev_shell_jobs_trust_the_nix_cache(self): + # Without the flake's substituter, the dev shell builds uncached tools from + # source and outlasts short jobs: the benchmark site timed out before publishing. workflow = (ROOT / ".github/workflows/nightly.yml").read_text() jobs = re.split(r"^ (?=[\w-]+:\n)", workflow.split("\njobs:\n", 1)[1], flags=re.M) for job in jobs: if "nix develop" in job: - self.assertIn("extra-substituters = https://kixelated.cachix.org", job, job.splitlines()[0]) + self.assertIn("uses: ./.github/actions/nix", job, job.splitlines()[0]) def test_benchmark_tests_stay_out_of_cargo_bench(self): result, calls = self.run_group("rust-test")