Skip to content
Cachix

Cachix documentation

Share your project’s Nix builds with Cachix so other machines can download the results instead of building them again.

How binary caches work

Start using Cachix

Push your project’s builds

Create a cache for your project and upload its build results. Other machines can then download those results from your cache.

Make your first push
Project directory
$ nix-build
$ cachix push MY_CACHE ./result

Cache builds in CI

Use Cachix in your CI workflow so later runs can download the results of earlier builds. Your team can use the same cache on their own machines. Replace MY_CACHE with your cache name.

Set up cachix-actionBrowse CI guides
GitHub Actions step
- uses: cachix/cachix-action@v17
with:
name: MY_CACHE
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

Manage your cache

As your cache grows, you can choose where dependencies come from and which builds to keep.

Deployments

Cachix Deploy

Deploy your builds to machines running Cachix agents.