NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.87k stars 364 forks source link

Why is nixops repeat copying path? #1384

Closed Ninlives closed 4 years ago

Ninlives commented 4 years ago

So I tried to deploy to my raspberrypi, and I noticed nixops tries to copy closure from binary cache, but those paths are already in my laptop, why are these paths copied?

adisbladis commented 4 years ago

NixOps will, by default, prefer to substitute paths on the remote system directly from the cache.

Consider the following (probably the most common NixOps deployment scenario): You are deploying from your laptop to a cloud provider, let's say EC2. You wouldn't want to stress someones home internet connection with perhaps multiple gigabytes of data being copied from a potentially very slow connection when substituting from https://cache.nixos.org is orders of magnitudes faster.

There is a knob you can tune to adjust this behaviour, namely deployment.hasFastConnection = true;.

adisbladis commented 4 years ago

I'm closing this as it's working as intended.