diff options
author | awy <awy@awy.one> | 2024-11-25 00:14:15 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2024-11-25 00:14:15 +0300 |
commit | a9163940d9ecb550d6e6c3e059fc3c4394e7bf1d (patch) | |
tree | f6e08dd46fc18b7e7bc607f0a3b64ea467a06ec8 | |
parent | db37945c8f3ebde5512fd5bb8bf56daf510b9047 (diff) |
move npm from home
-rw-r--r-- | .config/shell/profile | 1 | ||||
-rwxr-xr-x | rice.sh | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/.config/shell/profile b/.config/shell/profile index 19a90b5..3080b24 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -9,6 +9,7 @@ export TERMINAL_PROG="foot" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" +export XDG_STATE_HOME="$HOME/.local/state" export XDG_DOWNLOAD_DIR="$HOME/downloads" export GIT_CONFIG="$XDG_CONFIG_HOME/git/config" export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass @@ -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 <<EOL >> /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 {} \; |