Save 30-50%+ of CI time without any effort or cost. Use Magic Nix Cache, a totally free and zero-configuration binary cache for Nix on GitHub Actions.
Find a file
Graham Christensen 407824895b
trustdns?
2023-06-22 22:29:57 -04:00
.cargo Misc cleanup 2023-05-22 16:00:34 -06:00
.github/workflows Merge remote-tracking branch 'origin/main' into fix-clippy-issues 2023-06-22 12:03:33 -07:00
gha-cache trustdns? 2023-06-22 22:29:57 -04:00
nix-actions-cache use a pretty fmt 2023-06-22 21:28:35 -04:00
.envrc Kind of works 2023-05-08 03:48:11 -06:00
.gitignore Misc cleanup 2023-05-22 16:00:34 -06:00
Cargo.lock trustdns? 2023-06-22 22:29:57 -04:00
Cargo.toml Kind of works 2023-05-08 03:48:11 -06:00
crane.nix Remove flake-utils, update flake.lock, and reformat Nix sources 2023-06-22 11:19:49 -07:00
flake.lock Remove flake-utils, update flake.lock, and reformat Nix sources 2023-06-22 11:19:49 -07:00
flake.nix Remove flake-utils, update flake.lock, and reformat Nix sources 2023-06-22 11:19:49 -07:00
README.md README.md: Track tasks in issues instead 2023-05-19 13:00:36 -06:00
shell.nix Remove flake-utils, update flake.lock, and reformat Nix sources 2023-06-22 11:19:49 -07:00

nix-actions-cache

nix-actions-cache is a minimal Nix Binary Cache server backed by the GitHub Actions Cache. It can be compiled into a ~3.5MB static binary for distribution, allowing it to start prefetching NARs used in a previous run even before Nix is installed (not implemented yet).

Development

This project depends on internal APIs used by the GitHub Actions Cache. See gha-cache/README.md for more details on how to obtain the required tokens.

cargo run -- -c creds.json --upstream https://cache.nixos.org
cargo build --release --target x86_64-unknown-linux-musl
cargo build --release --target aarch64-unknown-linux-musl
nix copy --to 'http://127.0.0.1:3000' $(which bash)
nix-store --store $PWD/test-root --extra-substituters 'http://localhost:3000' --option require-sigs false -r $(which bash)