Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document operation with minimal copying from local #340

Open
colemickens opened this issue Jun 27, 2024 · 6 comments
Open

document operation with minimal copying from local #340

colemickens opened this issue Jun 27, 2024 · 6 comments

Comments

@colemickens
Copy link
Member

Hi,

I have a situation where it's easy for me to push to a cache, and easy to pull from the cache, but very excruciatingly slow to copy from the local machine.

I'm opening this to collect suggestions on how to minimize the paths that are copied from local.

Potential criteria to close this:

  • document how to build all of the paths that nixos-anywhere deploys, and push to cachix
  • document an example using --option with a cachix cache
  • explore an option that prevents any nix-copy from happening, requiring anything to be pre-cached

Also open to feedback if this is a bad idea, etc.

@phaer
Copy link
Member

phaer commented Jun 27, 2024

Would it help to use --build-on-target? This might avoid much of the copying, as nix wouldn't need copy much more than the flake itself, while substituting direct from the cache.

@colemickens
Copy link
Member Author

Aye, indeed, I was doing that. Even copying the source to the destination was excruciatingly slow. My wifi was so bad that I never even managed to get it to work. I had to eventually SSH to another server, and run it from there.

If I could have pre-staged the source derivation, disko script, etc, into a cache, the builder could just download it.

It's probably just a matter of finding the right attr path for the source derivations and pushing those. Then it should just substitute if I pass the right options.

@Mic92
Copy link
Member

Mic92 commented Jun 30, 2024

You can follow our nixos test. You need the disko-script and nixos toplevel in your binary cache:

"nixos-anywhere/disko".source = system-to-install.config.system.build.diskoScript;

@chreekat
Copy link
Contributor

On this topic, --help makes it sound like nixos-anywhere should be using --substitute-on-destination by default, but I don't observe this happening.

Ha, in fact it looks like the option may have been inverted? I specified --no-substitute-on-destination and now it is substituting on the destination!

@chreekat
Copy link
Contributor

Looks like this happened yesterday. 7637325

@chreekat
Copy link
Contributor

#386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants