From bc63b007e54424ec9eef21f4577dba69d2f54426 Mon Sep 17 00:00:00 2001 From: beviu Date: Fri, 25 Oct 2024 15:23:01 +0200 Subject: [PATCH] Mention support for `~/` paths in nix.conf in manual Fixes: https://git.lix.systems/lix-project/lix/issues/497 Change-Id: I9606900d17f62359cef4fe2c8a01e5791390a870 --- doc/manual/src/command-ref/conf-file.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/manual/src/command-ref/conf-file.md b/doc/manual/src/command-ref/conf-file.md index fda6ebde7..d467b0b7d 100644 --- a/doc/manual/src/command-ref/conf-file.md +++ b/doc/manual/src/command-ref/conf-file.md @@ -34,9 +34,15 @@ keep-outputs = true # Nice for developers keep-derivations = true # Idem ``` -Other files can be included with a line like `include `, where `` is interpreted relative to the current configuration file. +Other files can be included with a line like `include `. A missing file is an error unless `!include` is used instead. +Paths in `include`s and option values are interpreted relative to the current configuration file. +In user configuration files, paths starting with `~/` are tilde expanded (by replacing the tilde by the value of `$HOME`). + +Only user configuration files (like `$XDG_CONFIG_HOME/nix/nix.conf` or the files listed in `$NIX_USER_CONF_FILES`) can use tilde paths relative to your home directory. +Configuration listed in the `$NIX_CONFIG` environment variable may not use relative paths. + A configuration setting usually overrides any previous value. However, for settings that take a list of items, you can prefix the name of the setting by `extra-` to *append* to the previous value.