aboutsummaryrefslogtreecommitdiff
path: root/files/etc/profile.d/local-homedir.sh.common
blob: d5abb9044f255838c2a2b120833017bd4028f54b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# This file contains various environment variables and hacks to accomodate
# applications that don't play well with NFS-mounted home directories.

if [ "$(id -u)" -lt 1000 ]; then
  return 0
fi

LOCAL_HOME="/usr/local/home/${USER}"

export PYTHONUSERBASE="${LOCAL_HOME}/.local"
export npm_config_cache="${LOCAL_HOME}/.npm"
export CARGO_HOME="${LOCAL_HOME}/.cargo"
export GOPATH="${LOCAL_HOME}/go"

# firefox
mkdir -p "${LOCAL_HOME}/.mozilla"
ln -sfn "${LOCAL_HOME}/.mozilla" "${HOME}/.mozilla"

# kwallet
# The kwallet PAM module hard-codes ~/.local/share/kwalletd, but kwallet itself
# honors XDG_DATA_HOME! So we symlink from the local disk back into NFS. Gross!
mkdir -p "${LOCAL_HOME}/.local/share/kwalletd"
ln -sfn "${HOME}/.local/share/kwalletd/kwallet.salt" "${LOCAL_HOME}/.local/share/kwalletd/kdewallet.salt"