Home Explore Blog CI



nix

2nd chunk of `doc/manual/source/command-ref/env-common.md`
13df81036a8d17e46d84cf1f2453dc12fc894374b99220fb0000000100000847
- <span id="env-NIX_STORE_DIR">[`NIX_STORE_DIR`](#env-NIX_STORE_DIR)</span>

  Overrides the location of the Nix store (default `prefix/store`).

- <span id="env-NIX_DATA_DIR">[`NIX_DATA_DIR`](#env-NIX_DATA_DIR)</span>

  Overrides the location of the Nix static data directory (default
  `prefix/share`).

- <span id="env-NIX_LOG_DIR">[`NIX_LOG_DIR`](#env-NIX_LOG_DIR)</span>

  Overrides the location of the Nix log directory (default
  `prefix/var/log/nix`).

- <span id="env-NIX_STATE_DIR">[`NIX_STATE_DIR`](#env-NIX_STATE_DIR)</span>

  Overrides the location of the Nix state directory (default
  `prefix/var/nix`).

- <span id="env-NIX_CONF_DIR">[`NIX_CONF_DIR`](#env-NIX_CONF_DIR)</span>

  Overrides the location of the system Nix configuration directory
  (default `prefix/etc/nix`).

- <span id="env-NIX_CONFIG">[`NIX_CONFIG`](#env-NIX_CONFIG)</span>

  Applies settings from Nix configuration from the environment.
  The content is treated as if it was read from a Nix configuration file.
  Settings are separated by the newline character.

- <span id="env-NIX_USER_CONF_FILES">[`NIX_USER_CONF_FILES`](#env-NIX_USER_CONF_FILES)</span>

  Overrides the location of the Nix user configuration files to load from.

  The default are the locations according to the [XDG Base Directory Specification].
  See the [XDG Base Directories](#xdg-base-directories) sub-section for details.

  The variable is treated as a list separated by the `:` token.

- <span id="env-TMPDIR">[`TMPDIR`](#env-TMPDIR)</span>

  Use the specified directory to store temporary files. In particular,
  this includes temporary build directories; these can take up
  substantial amounts of disk space. The default is `/tmp`.

- <span id="env-NIX_REMOTE">[`NIX_REMOTE`](#env-NIX_REMOTE)</span>

  This variable should be set to `daemon` if you want to use the Nix
  daemon to execute Nix operations. This is necessary in [multi-user
  Nix installations](@docroot@/installation/multi-user.md). If the Nix
  daemon's Unix socket is at some non-standard path, this variable
  should be set to `unix://path/to/socket`. Otherwise, it should be

Title: More Common Nix Environment Variables
Summary
This section continues the description of common Nix environment variables. It includes: `NIX_STORE_DIR` (overrides Nix store location), `NIX_DATA_DIR` (overrides Nix static data directory), `NIX_LOG_DIR` (overrides Nix log directory), `NIX_STATE_DIR` (overrides Nix state directory), `NIX_CONF_DIR` (overrides system Nix configuration directory), `NIX_CONFIG` (applies settings from Nix configuration), `NIX_USER_CONF_FILES` (overrides location of user configuration files), `TMPDIR` (specifies directory for temporary files), and `NIX_REMOTE` (specifies whether to use the Nix daemon and its socket path).