[Nix-dev] Installing /nix on nfs-mounted volume possible?
deCube.net | Danny Wilson
danny at decube.net
Tue Feb 9 19:21:50 CET 2016
I’ve used a shared nix store between VMs in the past, until the sqlite database got corrupted…
If I’d do it again, I would configure a single build VM ( nix.buildMachines ) and set nix.maxJobs to 0. That guarantees all builds are executed on this one machine. Any nix store copying after the build will then be a noop, since the store is completely shared :-)
What I did to get a bootable /nix store, was this:
https://gist.github.com/vizanto/7568026
Note the per-hostname profile directory: /mnt-root/nix/vm-specific/`hostname`/var/nix/profiles
This is done to have intra-vm garbage collection working, since all profiles are known.
On 9 feb. 2016, at 18:35, Ben Booth <benwbooth at gmail.com> wrote:
>
>> On Feb 8, 2016, at 10:15 AM, Wout Mertens <wout.mertens at gmail.com> wrote:
>> The problem with nfs nix stores is that the metadata is stored in sqlite, which can't guarantee proper locking on nfs. However, if you only write from one host, there is no problem.
>>
>> As for the python stuff, you can run it in a proot, or use nixos which doesn't have /usr :-)
>>
> Thanks for your help! I've thought of a new approach: create a NixOS VM, and then export its /nix store as a read-only NFS mount. That way, if a user wants to install software, they can just ssh into the NixOS VM, install it there in an isolated environment, with no NFS locking issues, then that software can be used on any other VM instance. Can you think of any reason that would not work?
>
> Thanks!
> Ben
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160209/849ad269/attachment.html
More information about the nix-dev
mailing list