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

deploy_nixos: parameterise concurrency controls of nix-copy-closure #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

denbeigh2000
Copy link

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.

@denbeigh2000
Copy link
Author

👋 hello, this is my first pr in this project!

i'm happy to make any changes to fit in with preferred code styling/conventions/preferences here - if you have any requests, just let me know.

@denbeigh2000 denbeigh2000 force-pushed the denbeigh/copy-concurrency branch from eab07d7 to 227cfbd Compare August 4, 2024 10:19
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

Successfully merging this pull request may close these issues.

1 participant