lix/src
Alexander Bantyev 2384d36083
A setting to follow XDG Base Directory standard
XDG Base Directory is a standard for locations for storing various
files. Nix has a few files which seem to fit in the standard, but
currently use a custom location directly in the user's ~, polluting
it:

- ~/.nix-profile
- ~/.nix-defexpr
- ~/.nix-channels

This commit adds a config option (use-xdg-base-directories) to follow
the XDG spec and instead use the following locations:

- $XDG_STATE_HOME/nix/profile
- $XDG_STATE_HOME/nix/defexpr
- $XDG_STATE_HOME/nix/channels

If $XDG_STATE_HOME is not set, it is assumed to be ~/.local/state.

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
Co-authored-by: Tim Fenney <kodekata@gmail.com>
Co-authored-by: pasqui23 <pasqui23@users.noreply.github.com>
Co-authored-by: Artturin <Artturin@artturin.com>
Co-authored-by: John Ericson <Ericson2314@Yahoo.com>
2023-02-10 20:14:06 +04:00
..
build-remote build-remote: Add brackets to error message 2022-11-04 10:49:44 -07:00
libcmd Fix unreachable error message 2023-01-20 13:01:03 +01:00
libexpr A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
libfetchers Allow to disable global flake-registry with "" 2022-12-12 15:32:02 +01:00
libmain Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
libstore A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
libutil A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
nix Avoid some StorePath <-> Path round trips 2023-01-30 09:37:57 -05:00
nix-build Make it hard to construct an empty OutputsSpec::Names 2023-01-11 19:08:19 -05:00
nix-channel A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
nix-collect-garbage Add missing rethrows in conditional exception handlers 2022-06-10 10:52:41 -07:00
nix-copy-closure copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
nix-env A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
nix-instantiate Revert to copyStore = true for nix-instantiate and nix-env 2022-08-23 14:40:27 +02:00
nix-store Fix unused variable warning 2022-12-12 16:41:46 +01:00
resolve-system-dependencies Get rid of most .at calls (#6393) 2022-05-04 07:44:32 +02:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00