3 ms·
Or 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
by alright2565 2mo ago
Or 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.