diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-28 11:34:34 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-28 11:34:34 -0500 |
commit | d12f57c2c0ef32180875aa4a0b803c838a7d988f (patch) | |
tree | 2c046d98bc0bd9171881ff0b6d56fa89c7c642e6 /doc/manual/src/command-ref/env-common.md | |
parent | c36b584f8eb103afa152ef4304cf9fd5c3ebaaf0 (diff) | |
parent | 4489def1b36aeaee2254159efc1c21c868cc8585 (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'doc/manual/src/command-ref/env-common.md')
-rw-r--r-- | doc/manual/src/command-ref/env-common.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/manual/src/command-ref/env-common.md b/doc/manual/src/command-ref/env-common.md index bb85a6b07..c5d38db47 100644 --- a/doc/manual/src/command-ref/env-common.md +++ b/doc/manual/src/command-ref/env-common.md @@ -91,3 +91,16 @@ Most Nix commands interpret the following environment variables: variable sets the initial size of the heap in bytes. It defaults to 384 MiB. Setting it to a low value reduces memory consumption, but will increase runtime due to the overhead of garbage collection. + +## XDG Base Directory + +New Nix commands conform to the [XDG Base Directory Specification], and use the following environment variables to determine locations of various state and configuration files: + +- [`XDG_CONFIG_HOME`]{#env-XDG_CONFIG_HOME} (default `~/.config`) +- [`XDG_STATE_HOME`]{#env-XDG_STATE_HOME} (default `~/.local/state`) +- [`XDG_CACHE_HOME`]{#env-XDG_CACHE_HOME} (default `~/.cache`) + +Classic Nix commands can also be made to follow this standard using the [`use-xdg-base-directories`] configuration option. + +[XDG Base Directory Specification]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +[`use-xdg-base-directories`]: ../command-ref/conf-file.md#conf-use-xdg-base-directories
\ No newline at end of file |