4 ms·
Updating causing a rebuild isn't really a Nix or even a build tool problem though, is it? cache.nixos.org can't provide everything for every architecture all th
by GreenDolphinSys 2mo ago
Updating causing a rebuild isn't really a Nix or even a build tool problem though, is it? cache.nixos.org can't provide everything for every architecture all the time.
With multiple types of machines involved, you want some sort of binary cache setup, ideally automated with CI. There's niks3 [0], celler [1] (a more active fork of attic [2]), hydra [3].
0: https://github.com/Mic92/niks3 https://github.com/Mic92/niks3
1: https://github.com/celler-cache/celler https://github.com/celler-cache/celler
2: https://github.com/zhaofengli/attic https://github.com/zhaofengli/attic
3: https://github.com/NixOS/hydra https://github.com/NixOS/hydra
- alright2565 2mo agoOr my personal favorite, just an s3 bucket. In your CI's nix.conf: post-build-hook = .../upload-to-cache.sh upload-to-cache.sh: #!/usr/bin/env bash set -euo pipefail set -f export IFS=' ' exec "${NIX_CACHE_NIX_BIN:-nix}" copy --extra-experimental-features nix-command \ --to "s3://my-cache-bucket?region=us-east-1" $OUT_PATHS Set up environment variables as necessary for auth.