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

How to use cache.nixos.org? #68

Open
srid opened this issue Dec 24, 2022 · 2 comments
Open

How to use cache.nixos.org? #68

srid opened this issue Dec 24, 2022 · 2 comments
Labels
in-progress We're working on this

Comments

@srid
Copy link

srid commented Dec 24, 2022

For every new repo I add, I see that HCI is building the entire world of dependencies; and this happens fairly all the time given that each repo pins a different nixpkgs. Is there a particular reason it is not pulling them from cache.nixos.org?

Perhaps it uses exactly the caches specified in binary-caches.json (I have one; my nix-server server where drvs are pushed to). Can this file also contain read-only caches like official cache (ie., caches which should not be pushed to)?

It would be nice to document this under FAQ or somewhere. I'd rather avoid this world-building and re-use from official cache.

@srid
Copy link
Author

srid commented Dec 25, 2022

( I hadn't seen the support repo, but this should probably be moved to https://github.com/hercules-ci/support/issues )

@roberth roberth changed the title How to use official cache? How to use cache.nixos.org? Dec 26, 2022
@roberth roberth transferred this issue from hercules-ci/docs.hercules-ci.com Dec 26, 2022
@roberth
Copy link
Member

roberth commented Dec 26, 2022

For every new repo I add, I see that HCI is building the entire world of dependencies

You're right that Hercules CI tries to build the world, and there's some opportunity to optimize this, at least regarding the build dependencies that have already been built. Whether the agent can convince Nix (libstore) to push paths without pushing the whole closure, I'm not sure, but I expect a good improvement from ignoring just the build dependencies that exist in upstream caches

Perhaps it uses exactly the caches specified in binary-caches.json

It is meant to extend the system substituters. You can confirm this by looking at substitutions that happen in the derivation build log, or perhaps in the evaluation log if you use IFD.

It would be nice to document this under FAQ or somewhere.

  • Review documentation after optimizing the eval / build dispatch

@roberth roberth added the in-progress We're working on this label Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress We're working on this
Projects
None yet
Development

No branches or pull requests

2 participants