Is it possible to distributed nix builds across multiple machines?

As the title says, I have a large derivation that takes a few hours to build on a single fast machine. I’m wondering if using the existing nix stack we can distribute the derivation across multiple machines?

If not, where could I start implementing something like this? I’m thinking something like using nix-instantiate to get a list of the paths, and a queue to pass the list of jobs to nix-build, but I’m hoping there is a better (premade) solution

2 Likes

not sure how that would work but there is ccache program in nixos to speedup compilation. As for distributing builds, there might be something called distcc.