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
iso: copy input closourse into iso to avoide re-download #191
Conversation
library functions now can access inputs (and their sources!) directly, for example in order to copy their closure into the iso registry so that evaluating the flake does not need to fetch inputs again
73507a1
to
b32e451
Compare
This comment has been minimized.
This comment has been minimized.
This intends to avoid downloading inputs on the iso live image and is a step towards completely air-gaped installs. credits: @Pacman99 closes: divnix#190
This avoids for the live nixos on the iso to rebuild the devshell upon entering it.
bors try |
ohh wait I actually haven't tested that code locally, I just wrote the code out. But it should be simple enough to build the isoConfig and inspect the result. |
I fully tried end to end and it works.
Maybe we need to filter out the ones that are |
Yeah you could, but it really wouldn't make much of a difference. Worst case theres just one unnecessary folder in the nix store. |
Ok, let's don't bother then. That path might even be useful on the iso under some odd circumstances. |
So I'm not sure about this. But perhaps we could not import all modules of the system and just selectively pass along parts of the configuration. This would prevent starting up unnecessary system services while still adding necessary dependencies. I think this would involve evaluating the modules in a seperate for example: environment = { inherit (system.config.environment) systemPackages; }; |
Do you refer to your previous suggestion to not enable all modules? This PR is meant (and restrained to) specifically to target #190. I'll open an issue for that. |
Yeah its just another idea. Doesn't have to be a part of this PR. |
x-ref: #194 |
tryBuild succeeded: |
if it's ready, go ahead and merge |
✌️ blaggacao can now approve this pull request. To approve and merge a pull request, simply reply with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I suspect that it actually does not cache evaluations, since the commands still take some time in silence, that is no command output (which I only can explain with evaluation)? Can those evaluations, like this, for example, also be copied into the store? Let's make this a separate issue, for now, on slow machines it still amounts to some 60 seconds or so. |
bors r+ |
Build succeeded: |
closes #190
Tested on my setup, considerably cuts times and only leaves one (noticable) download.