[Nix-dev] Is $NIX_OTHER_STORES still supported?
Eelco Dolstra
eelco.dolstra at logicblox.com
Mon Jun 1 17:28:40 CEST 2015
Hi Peter,
On 31/05/15 11:33, Peter Simons wrote:
> I've been trying to make my NixOS re-use another machine's store, but
> I've had no success. I've mounted the other machine's file system as
> follows:
>
> # mkdir /run/nix/remote-stores/other
> # sshfs -o allow_root other:/ /run/nix/remote-stores/other
>
> The other's /nix directory is visible:
>
> # ls -ld $NIX_OTHER_STORES
> drwxr-xr-x 1 root root 4096 Mar 27 2014 /run/nix/remote-stores/other/nix
>
> However, my nix-env operations never seem to access that store, even
> though I know for sure that it contains the derivations I'm installing.
>
> Is there anything else I have to do to activate this feature?
It's not enabled by default. You need to set NIX_SUBSTITUTERS to include
copy-from-other-stores.pl.
Check out the NixOS installer, which uses it to ensure that binaries are copied
from the installation CD:
https://github.com/NixOS/nixos/blob/master/modules/installer/tools/nixos-install.sh
However, NIX_OTHER_STORES might be removed at some point because it doesn't work
well anymore for access to remote stores since Nix started used SQLite.
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
More information about the nix-dev
mailing list