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 workStart 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$ nix-build$ cachix push MY_CACHE ./resultUse your team’s builds
Connect Nix to a cache your team already uses and download matching builds. You’ll need a token with read access if the cache is private.
Use an existing cache$ cachix use MY_CACHE$ nix-buildCache 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.
- 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.
Share dependencies
Share dependencies between caches with upstreams instead of uploading the same paths to each cache.
Configure upstreamsKeep releases available
Protect a release and its dependencies from garbage collection with pins.
Create a pinManage storage
Understand how garbage collection selects paths for removal and how pins protect builds you want to keep.
Understand garbage collectionDeployments
Cachix Deploy
Deploy your builds to machines running Cachix agents.