[Nix-dev] Sharing the Nix store between systems

Michael Raskin 7c6f434c at mail.ru
Tue Dec 13 05:41:30 CET 2011


>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.





More information about the nix-dev mailing list