From a9163940d9ecb550d6e6c3e059fc3c4394e7bf1d Mon Sep 17 00:00:00 2001 From: awy Date: Mon, 25 Nov 2024 00:14:15 +0300 Subject: move npm from home --- rice.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rice.sh') diff --git a/rice.sh b/rice.sh index 738a86e..38b6089 100755 --- a/rice.sh +++ b/rice.sh @@ -18,6 +18,8 @@ doas -u $PERMUSER cp -r "$WORKDIRECTORY"/.local /home/$PERMUSER doas -u $PERMUSER cp -a "$WORKDIRECTORY"/.zprofile /home/$PERMUSER doas -u $PERMUSER mkdir -p /home/$PERMUSER/.config/git +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.config/npm +doas -u $PERMUSER touch /home/$PERMUSER/.config/npm/npmrc doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/lf doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/zsh doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/themes @@ -62,6 +64,13 @@ default-cache-ttl 34560000 max-cache-ttl 34560000 EOL +cat <> /home/$PERMUSER/.config/npm/npmrc +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js +logs-dir=${XDG_STATE_HOME}/npm/logs +EOL + doas -u $PERMUSER find /home/$PERMUSER/.gnupg -type f -exec chmod 600 {} \; doas -u $PERMUSER find /home/$PERMUSER/.gnupg -type d -exec chmod 700 {} \; doas -u $PERMUSER find /home/$PERMUSER/.ssh -type f -exec chmod 600 {} \; -- cgit v1.2.3