2024-06-08 12:37:01 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
nix.settings.use-xdg-base-directories = true;
|
|
|
|
|
|
|
|
home.sessionVariables = let
|
|
|
|
inherit (config.xdg) dataHome cacheHome configHome userDirs;
|
2024-12-03 13:20:41 +01:00
|
|
|
runtimeDir = "/run/user/${toString config.home.uid}";
|
2024-06-08 12:37:01 +02:00
|
|
|
in {
|
|
|
|
TEXMFHOME = "${dataHome}/texmf";
|
|
|
|
TEXMFVAR = "${cacheHome}/texlive";
|
|
|
|
TEXMFCONFIG = "${configHome}/texlive";
|
|
|
|
|
|
|
|
PSQL_HISTORY = "${dataHome}/psql_history";
|
|
|
|
SQLITE_HISTORY= "${dataHome}/sqlite_history";
|
|
|
|
MYSQL_HISTFILE = "${dataHome}/mysql_history";
|
|
|
|
NODE_REPL_HISTORY = "${dataHome}/node_repl_history";
|
|
|
|
GDB_HISTFILE = "${dataHome}/gdb_history";
|
|
|
|
PYTHON_HISTORY = "${dataHome}/python_history";
|
|
|
|
|
|
|
|
GHCUP_USE_XDG_DIRS = "true";
|
|
|
|
|
2024-08-16 12:39:57 +02:00
|
|
|
__GL_SHADER_DISK_CACHE_PATH = "${cacheHome}/nv";
|
2024-06-08 12:37:01 +02:00
|
|
|
ANDROID_USER_HOME = "${dataHome}/android";
|
|
|
|
AZURE_CONFIG_DIR = "${dataHome}/azure";
|
2024-08-16 12:39:57 +02:00
|
|
|
BZRPATH = "${configHome}/bazaar";
|
|
|
|
BZR_PLUGIN_PATH = "${dataHome}/bazaar";
|
|
|
|
BZR_HOME = "${cacheHome}/bazaar";
|
2024-06-08 12:37:01 +02:00
|
|
|
CARGO_HOME = "${dataHome}/cargo";
|
|
|
|
CUDA_CACHE_PATH = "${cacheHome}/nv";
|
|
|
|
DOCKER_CONFIG = "${configHome}/docker";
|
|
|
|
DOTNET_CLI_HOME = "${dataHome}/dotnet";
|
|
|
|
DOT_SAGE = "${configHome}/sagemath";
|
|
|
|
ELM_HOME = "${configHome}/";
|
|
|
|
GOPATH = "${dataHome}/go";
|
2024-06-26 20:19:05 +02:00
|
|
|
GRIPHOME = "${configHome}/grip";
|
2024-06-08 12:37:01 +02:00
|
|
|
GRADLE_USER_HOME = "${dataHome}/gradle";
|
|
|
|
ICEAUTHORITY = "${cacheHome}/ICEauthority";
|
|
|
|
NIMBLE_DIR = "${dataHome}/nimble";
|
|
|
|
NLTK_DATA = "${dataHome}/nltk_data";
|
2024-12-03 13:20:41 +01:00
|
|
|
NPM_CONFIG_CACHE="${cacheHome}/npm";
|
|
|
|
NPM_CONFIG_INIT_MODULE="${configHome}/npm/config/npm-init.js";
|
|
|
|
NPM_CONFIG_TMP="${runtimeDir}/npm";
|
2024-06-08 12:37:01 +02:00
|
|
|
NRFUTIL_HOME = "${dataHome}/nrfutil";
|
|
|
|
NUGET_PACKAGES = "${cacheHome}/nuget-packages";
|
|
|
|
PARALLEL_HOME = "${configHome}/parallel";
|
|
|
|
PYENV_ROOT = "${dataHome}/pyenv";
|
|
|
|
RUSTUP_HOME = "${dataHome}/rustup";
|
2024-06-26 20:19:05 +02:00
|
|
|
RYE_HOME = "${dataHome}/rye";
|
2024-06-08 12:37:01 +02:00
|
|
|
STACK_ROOT = "${dataHome}/stack";
|
|
|
|
W3M_DIR = "${dataHome}/w3m";
|
|
|
|
WINEPREFIX = "${dataHome}/wine";
|
|
|
|
|
|
|
|
# TODO: these needs to be set before the user session has fully initialized
|
|
|
|
# XINITRC = "$XDG_CONFIG_HOME/x11/initrc";
|
|
|
|
# XAUTHORITY
|
|
|
|
# ERRFILE = "${cacheHome}/X11/xsession-errors";
|
|
|
|
# USERXSESSION
|
|
|
|
# XCOMPOSECACHE="${cacheHome}/X11/xcompose";
|
|
|
|
# XCURSOR_PATH
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile = {
|
|
|
|
"npm/npmrc".text = ''
|
|
|
|
prefix=${config.xdg.dataHome}/npm
|
|
|
|
cache=${config.xdg.cacheHome}/npm
|
|
|
|
init-module=${config.xdg.configHome}/npm/config/npm-init.js
|
|
|
|
'';
|
|
|
|
"bpython/config".text = ''
|
|
|
|
[general]
|
|
|
|
hist_file = ${config.xdg.dataHome}/bpython_history
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|