1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 16:31:47 +02:00

Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined (#11351)

This commit is contained in:
Noam Yorav-Raphael 2024-09-11 13:36:46 +03:00 committed by GitHub
parent c60e1be62c
commit 38bfbb297c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 118 additions and 48 deletions

View file

@ -24,12 +24,12 @@ Path getHomeOf(uid_t userId);
Path getHome();
/**
* @return $XDG_CACHE_HOME or $HOME/.cache.
* @return $NIX_CACHE_HOME or $XDG_CACHE_HOME/nix or $HOME/.cache/nix.
*/
Path getCacheDir();
/**
* @return $XDG_CONFIG_HOME or $HOME/.config.
* @return $NIX_CONFIG_HOME or $XDG_CONFIG_HOME/nix or $HOME/.config/nix.
*/
Path getConfigDir();
@ -39,12 +39,12 @@ Path getConfigDir();
std::vector<Path> getConfigDirs();
/**
* @return $XDG_DATA_HOME or $HOME/.local/share.
* @return $NIX_DATA_HOME or $XDG_DATA_HOME/nix or $HOME/.local/share/nix.
*/
Path getDataDir();
/**
* @return $XDG_STATE_HOME or $HOME/.local/state.
* @return $NIX_STATE_HOME or $XDG_STATE_HOME/nix or $HOME/.local/state/nix.
*/
Path getStateDir();