diff options
author | rebecca “wiggles” turner <rbt@sent.as> | 2024-09-01 22:06:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-09-01 22:06:36 +0000 |
commit | 02eb07cfd539c34c080cb1baf042e5e780c1fcc2 (patch) | |
tree | 0397ab434cce8b284a8d447594e2e1f3f35a1470 /doc/manual | |
parent | d75df91f74b6819f674f0733143fdf32580af183 (diff) | |
parent | 690f07272e58bfe86d12adb0bd6c81c031f930fd (diff) |
Merge changes I5566a985,I88cf53d3 into main
* changes:
Support relative and `~/` paths in config settings
Thread `ApplyConfigOptions` through config parsing
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/rl-next/relative-and-tilde-paths-in-config.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/manual/rl-next/relative-and-tilde-paths-in-config.md b/doc/manual/rl-next/relative-and-tilde-paths-in-config.md new file mode 100644 index 000000000..6645496a2 --- /dev/null +++ b/doc/manual/rl-next/relative-and-tilde-paths-in-config.md @@ -0,0 +1,30 @@ +--- +synopsis: Relative and tilde paths in configuration +issues: [fj#482] +cls: [1851, 1863, 1864] +category: Features +credits: [9999years] +--- + +[Configuration settings](@docroot@/command-ref/conf-file.md) can now refer to +files with paths relative to the file they're written in or relative to your +home directory (with `~/`). + +This makes settings like +[`repl-overlays`](@docroot@/command-ref/conf-file.md#conf-repl-overlays) and +[`secret-key-files`](@docroot@/command-ref/conf-file.md#conf-repl-overlays) +much easier to set, especially if you'd like to refer to files in an existing +dotfiles repo cloned into your home directory. + +If you put `repl-overlays = repl.nix` in your `~/.config/nix/nix.conf`, it'll +load `~/.config/nix/repl.nix`. Similarly, you can set `repl-overlays = +~/.dotfiles/repl.nix` to load a file relative to your home directory. + +Configuration files can also +[`include`](@docroot@/command-ref/conf-file.md#file-format) paths relative to +your home directory. + +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. |