Symptom
On the push-to-main run for #6075 (run 27277064565), both nix build matrix jobs failed ~50 minutes in with:
error: Nix daemon disconnected unexpectedly (maybe it crashed?)
After gh run rerun --failed, librefang-desktop passed but librefang-cli failed a second time with the identical signature — so this is not a one-off flake.
Diagnosis
The same merge commit's CI run hit System.IO.IOException: No space left on device on another ubuntu-latest runner (Test / Ubuntu (shard 2/4), run 27277064497, which passed on rerun).
ubuntu-latest ships with only ~14 GB of free disk; a full Nix build of the 24-crate workspace plus its /nix/store closure exceeds that, and the nix-daemon is killed when the disk fills — which surfaces as the "disconnected unexpectedly" error.
The cache-nix-action GC cap (gc-max-store-size-linux: 5G) only bounds the cached store, not peak build usage.
Fix
Add a pre-build step to .github/workflows/nix-build.yml that removes the large preinstalled toolchains the job never uses (dotnet, Android SDK, GHC, CodeQL bundle, docker images) — frees ~25 GB without pulling in a third-party action.
Symptom
On the push-to-main run for #6075 (run 27277064565), both
nix buildmatrix jobs failed ~50 minutes in with:After
gh run rerun --failed,librefang-desktoppassed butlibrefang-clifailed a second time with the identical signature — so this is not a one-off flake.Diagnosis
The same merge commit's CI run hit
System.IO.IOException: No space left on deviceon anotherubuntu-latestrunner (Test / Ubuntu (shard 2/4), run 27277064497, which passed on rerun).ubuntu-latestships with only ~14 GB of free disk; a full Nix build of the 24-crate workspace plus its/nix/storeclosure exceeds that, and the nix-daemon is killed when the disk fills — which surfaces as the "disconnected unexpectedly" error.The
cache-nix-actionGC cap (gc-max-store-size-linux: 5G) only bounds the cached store, not peak build usage.Fix
Add a pre-build step to
.github/workflows/nix-build.ymlthat removes the large preinstalled toolchains the job never uses (dotnet, Android SDK, GHC, CodeQL bundle, docker images) — frees ~25 GB without pulling in a third-party action.