[Nix-dev] Sharing the Nix store between systems
Rickard Nilsson
rickard.nilsson at telia.com
Tue Dec 13 09:45:36 CET 2011
Den 2011-12-13 05:41:30 skrev Michael Raskin <7c6f434c at mail.ru>:
>> One idea could be if slave build machines didn't build directly into the
>> store used by the host itself, but instead wrote to a temporary store,
>> and
>> also to a temporary database (or maybe it doesn't need to write to any
>> db
>> at all). The master host could then pick up the build results and put
>> them
>> into its database and into the shared store. I think that, in theory,
>> this
>> scheme could work. How about in practice?
>
> I guess you would need a chroot for this scheme. The simples way for
> nix-build I can imagine (my definition of simple may differ from yours)
> is a unionFS mount of the original filesystem and just an empty writable
> directory, chroot inside unionfs, building, exporting the built paths
> with nix-store --export, importing it on host, destroying the overlay
> directory.
>
> The "build" part of nixos-rebuild can be done in the same way.
Yes, something along those lines could work. I will think about how to
implement it in a not too complex fashion.
/ Rickard
More information about the nix-dev
mailing list