Caching nix builds

I have a very small application that requires some seriously big nixpkgs rebuilds (they take about half an hour on my machine). Is there any way to cache /nix between builds so that I don’t have to rebuild? Manual says that the cached directory needs to be writable by travis user, and /nix is most definetely not.

You probably want to use

As @kreisys says, integrating this with cachix is pretty neat. See for an example.

In case anyone else lands here, the nix wiki describes how to set up nix on travis with a cross-build cache, which can be used in addition to cachix.