From 8a41a97bbfd2b81d4e8f90ebfd3344adb80ed5fe Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 3 Dec 2024 13:20:41 +0100 Subject: [PATCH] home/xdg: set base dirs for npm --- home/config/xdg/directory-spec-overrides.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/config/xdg/directory-spec-overrides.nix b/home/config/xdg/directory-spec-overrides.nix index 8fa2654..aca8122 100644 --- a/home/config/xdg/directory-spec-overrides.nix +++ b/home/config/xdg/directory-spec-overrides.nix @@ -4,6 +4,7 @@ home.sessionVariables = let inherit (config.xdg) dataHome cacheHome configHome userDirs; + runtimeDir = "/run/user/${toString config.home.uid}"; in { TEXMFHOME = "${dataHome}/texmf"; TEXMFVAR = "${cacheHome}/texlive"; @@ -36,6 +37,9 @@ ICEAUTHORITY = "${cacheHome}/ICEauthority"; NIMBLE_DIR = "${dataHome}/nimble"; NLTK_DATA = "${dataHome}/nltk_data"; + NPM_CONFIG_CACHE="${cacheHome}/npm"; + NPM_CONFIG_INIT_MODULE="${configHome}/npm/config/npm-init.js"; + NPM_CONFIG_TMP="${runtimeDir}/npm"; NRFUTIL_HOME = "${dataHome}/nrfutil"; NUGET_PACKAGES = "${cacheHome}/nuget-packages"; PARALLEL_HOME = "${configHome}/parallel";