aboutsummaryrefslogtreecommitdiff
path: root/files/etc/profile.d/local-homedir.sh.common
blob: 170a96606ea0fa4465d3c63e72eabb70f51b8c70 (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
26
27
28
29
30
31
#!/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"
export WINE_i386_ROOT="${LOCAL_HOME}/.i386-wine-pkg"
export WINEPREFIX="${LOCAL_HOME}/.wine"

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

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

# 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"