Hi! I will work on a scientific base on Kerguelen Islands for a full year from next November. There, internet access is provided through a low-bandwidth VSAT connection and reserved for professional activities, so I won’t be able to use it to install software for my personal projects.
I want to use this constraint as an opportunity to study the use of NixOS in an isolated environment. My goal is to be able to update my configuration, install new software and deploy NixOS machines without relying on an internet access.
What I already know
So far, I know that setting up a local NixOS channel is as easy as getting
https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz. I can also copy the corresponding binary cache locally by running:
curl -L https://nixos.org/channels/nixos-19.03/store-paths.xz \ | xz -d \ | xargs \ nix copy --store https://cache.nixos.org/ \ --to file:///path/to/nixos-19.03/
Now, that works great if I want to install something that is in the binary cache. And here start my questions.
What I want to know
What exactly is included in the binary cache for a full channel, like
On this first question, I know that any variant of a derivation—by updating its compile flags for instance—is not included. However, its source is cached so I can build it, so it’s not an issue.
For what is not included, are the sources cached?
If a source is cached, I can build it in an isolated environment, so that’s great.
How can I cache the full set of sources?
This would permit to install anything that is referenced in
nixpkgs, which would be pretty neat. However, I don’t know if it is possible, and how much space it would require.
What about the different architectures?
How are managed the different architectures, like
aarch64? I would like to be able to setup
aarch64machines too if I want.
Any insight on these subjects is well appreciated