* Set $NIX_OTHER_STORES to /var/run/nix/remote-stores to make

automatic copying of build results from remote Nix stores work
  more-or-less automatically.  All you have to do is mount the remote
  FS on a subdirectory of /var/run/nix/remote-stores, e.g.

    $ sshfs remote_machine:/ /var/run/nix/remote-stores/foo

* Set $NIXPKGS_ALL.

svn path=/nixos/trunk/; revision=12411
This commit is contained in:
Eelco Dolstra 2008-07-23 16:06:03 +00:00
parent 5ec1fa2060
commit 3e8be34fcc
2 changed files with 16 additions and 4 deletions

View file

@ -6,6 +6,7 @@ if test -n "@nssModulesPath@"; then
fi
export MODULE_DIR=@modulesTree@/lib/modules
export NIXPKGS_CONFIG=/nix/etc/config.nix
export NIXPKGS_ALL=/etc/nixos/nixpkgs
export PAGER="less -R"
export TZ=@timeZone@
export TZDIR=@glibc@/share/zoneinfo

View file

@ -168,11 +168,22 @@ rec {
# Environment variables for running Nix.
nixEnvVars =
"export NIX_CONF_DIR=/nix/etc/nix\n" +
''
export NIX_CONF_DIR=/nix/etc/nix
# Enable the copy-from-other-stores substituter, which allows builds
# to be sped up by copying build results from remote Nix stores. To
# do this, mount the remote file system on a subdirectory of
# /var/run/nix/remote-stores.
export NIX_OTHER_STORES=/var/run/nix/remote-stores/*/nix
'' + # */
(if config.nix.distributedBuilds then
"export NIX_BUILD_HOOK=${nix}/libexec/nix/build-remote.pl\n" +
"export NIX_REMOTE_SYSTEMS=/etc/nix.machines\n" +
"export NIX_CURRENT_LOAD=/var/run/nix/current-load\n"
''
export NIX_BUILD_HOOK=${nix}/libexec/nix/build-remote.pl
export NIX_REMOTE_SYSTEMS=/etc/nix.machines
export NIX_CURRENT_LOAD=/var/run/nix/current-load
''
else "");