Common environment variables Most Nix commands interpret the following environment variables: NIX_ROOT If NIX_ROOT is set, the Nix command will on startup perform a chroot() to the specified directory. This is useful in certain bootstrapping situations (e.g., when installing a Nix installation onto a hard disk from CD-ROM). NIX_IGNORE_SYMLINK_STORE Normally, the Nix store directory (typically /nix/store) is not allowed to contain any symlink components. This is to prevent “impure” builds. Builders sometimes “canonicalise” paths by resolving all symlink components. Thus, builds on different machines (with /nix/store resolving to different locations) could yield different results. This is generally not a problem, except when builds are deployed to machines where /nix/store resolves differently. If you are sure that you’re not going to do that, you can set NIX_IGNORE_SYMLINK_STORE to 1. Note that if you’re symlinking the Nix store so that you can put it on another file system than the root file system, on Linux you’re better off using bind mount points, e.g., $ mkdir /nix $ mount -o bind /mnt/otherdisk/nix /nix Consult the mount 8 manual page for details. NIX_STORE_DIR Overrides the location of the Nix store (default prefix/store). NIX_DATA_DIR Overrides the location of the Nix static data directory (default prefix/share). NIX_LOG_DIR Overrides the location of the Nix log directory (default prefix/log/nix). NIX_STATE_DIR Overrides the location of the Nix state directory (default prefix/var/nix). NIX_DB_DIR Overrides the location of the Nix database (default $NIX_STATE_DIR/db, i.e., prefix/var/nix/db). NIX_CONF_DIR Overrides the location of the Nix configuration directory (default prefix/etc/nix). NIX_LOG_TYPE Equivalent to the option.