I often use this module to provision cloud machines that are incompatible with the host machine I am deploying from. In these cases, I often find that the slowest part is transferring .drv files to the remote machine, where they are then evaluated and built.
This change exposes the --max-jobs parameter of nix-copy-closure to the terraform operator as a variable, so more than one derivation can be copied to the remote host at a time. This isn't officially documented in --help/the man page of nix-copy-closure, but appears to be supported.
$ nix-copy-closure --max-jobs invalid
error: configuration setting 'max-jobs' should be 'auto' or an integer
Try 'nix-copy-closure --help' for more information.
In practice, this significantly improved my runtimes when deploying from incompatible host systems.
I often use this module to provision cloud machines that are incompatible with the host machine I am deploying from. In these cases, I often find that the slowest part is transferring
.drv
files to the remote machine, where they are then evaluated and built.This change exposes the
--max-jobs
parameter ofnix-copy-closure
to the terraform operator as a variable, so more than one derivation can be copied to the remote host at a time. This isn't officially documented in--help
/the man page ofnix-copy-closure
, but appears to be supported.In practice, this significantly improved my runtimes when deploying from incompatible host systems.