From 5c3bd87dd8f8f5e26f07fe55d4a671ea3b4dcfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pacana?= Date: Thu, 25 Jun 2026 23:30:22 +0200 Subject: [PATCH] Restore Cachix-backed CI caching - Use the writable mostlyobvious Cachix cache in CI instead of the GitHub Actions Nix store cache, which avoids large store snapshots. - Keep pulling from the devenv cache and add mostlyobvious as a devenv Cachix pull cache so local and CI evaluation share substitutes. --- .github/workflows/main.yml | 17 +++-------------- devenv.nix | 2 ++ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9183cd1..5d94b3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,23 +27,12 @@ jobs: with: extra_nix_config: | accept-flake-config = true - keep-outputs = true - keep-env-derivations = true - - name: Cache Nix store - uses: nix-community/cache-nix-action@v7 - with: - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'devenv.lock', 'devenv.yaml') }} - restore-prefixes-first-match: nix-${{ runner.os }}- - gc-max-store-size-linux: 1G - purge: true - purge-prefixes: nix-${{ runner.os }}- - purge-created: 0 - purge-last-accessed: P1DT12H - purge-primary-key: never - name: Set up cachix uses: cachix/cachix-action@v16 with: - name: devenv + name: mostlyobvious + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + extraPullNames: devenv - name: Install devenv run: nix profile install nixpkgs#devenv - name: Cache gems diff --git a/devenv.nix b/devenv.nix index 2d72e8e..524465c 100644 --- a/devenv.nix +++ b/devenv.nix @@ -5,6 +5,8 @@ }: { + cachix.pull = [ "mostlyobvious" ]; + languages.ruby.enable = true; languages.ruby.version = "4.0.5"; languages.ruby.bundler.package = -- 2.51.2