lix/src/libexpr
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
..
flake Add tests for error traces, and fixes 2023-01-19 14:10:56 +01:00
primops Merge pull request #7657 from obsidiansystems/fix-7655 2023-01-23 15:42:59 +01:00
tests Discuss re-entrant errors and design 2023-01-19 14:12:26 +01:00
value Parse string context elements properly 2023-01-10 13:10:49 -05:00
attr-path.cc Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
attr-path.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
attr-set.cc Don't pass Symbol by reference 2022-04-26 13:25:17 +02:00
attr-set.hh Don't pass Symbol by reference 2022-04-26 13:25:17 +02:00
eval-cache.cc Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
eval-cache.hh Make nix::eval_cache::int_t more idiomatic 2022-05-16 16:36:21 +02:00
eval-inline.hh Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
eval.cc A setting to follow XDG Base Directory standard 2023-02-10 20:14:06 +04:00
eval.hh Document default nix-path value 2023-01-27 15:25:07 +01:00
fetchurl.nix fetchurl.nix: change other use of __impure 2022-09-16 01:54:24 -07:00
function-trace.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
function-trace.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
get-drvs.cc Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
get-drvs.hh Remove pre-C++11 hackiness 2022-05-26 12:40:01 +02:00
imported-drv-to-derivation.nix Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
json-to-value.cc return string_views from forceString* 2022-01-27 17:15:43 +01:00
json-to-value.hh return string_views from forceString* 2022-01-27 17:15:43 +01:00
lexer.l Handle EOFs in string literals correctly 2022-05-25 17:58:13 +02:00
local.mk Parse string context elements properly 2023-01-10 13:10:49 -05:00
nix-expr.pc.in pkg-config files: Use c++17 2019-03-14 14:11:12 +01:00
nixexpr.cc Restore display of source lines for stdin/string inputs 2022-12-13 16:00:44 +01:00
nixexpr.hh Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
parser.y Revert "Revert "Merge pull request #6204 from layus/coerce-string"" 2023-01-19 13:23:04 +01:00
primops.cc Merge pull request #7447 from aakropotkin/read-file-type 2023-01-23 17:37:22 +01:00
primops.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
symbol-table.hh EvalCache AttrKey: Use Symbol instead of std::string 2022-04-26 14:16:20 +02:00
value-to-json.cc EvalState::copyPathToStore(): Return a StorePath 2022-12-20 14:58:39 +01:00
value-to-json.hh Replace src/libutil/json.cc with nlohmann json generation 2022-11-16 16:50:50 +01:00
value-to-xml.cc Introduce AbstractPos 2022-12-13 00:50:43 +01:00
value-to-xml.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
value.hh Add tests for error traces, and fixes 2023-01-19 14:10:56 +01:00