aboutsummaryrefslogtreecommitdiffstats
path: root/roles/local_homedirs/files/etc/profile.d/local-homedirs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/local_homedirs/files/etc/profile.d/local-homedirs.sh')
-rw-r--r--roles/local_homedirs/files/etc/profile.d/local-homedirs.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/local_homedirs/files/etc/profile.d/local-homedirs.sh b/roles/local_homedirs/files/etc/profile.d/local-homedirs.sh
new file mode 100644
index 0000000..88d710c
--- /dev/null
+++ b/roles/local_homedirs/files/etc/profile.d/local-homedirs.sh
@@ -0,0 +1,16 @@
+# This file contains various environment variables and hacks to accomodate
+# applications that don't play well with NFS-mounted home directories.
+
+if (( UID >= 1000 )); then
+ export PYTHONUSERBASE="/usr/local/home/${USER}/.local"
+ export npm_config_cache="/usr/local/home/${USER}/.npm"
+ export CARGO_HOME="/usr/local/home/${USER}/.cargo"
+ export GOPATH="/usr/local/home/${USER}/go"
+
+ # firefox
+ mkdir -p "/usr/local/home/${USER}/.mozilla"
+ ln -sfn "/usr/local/home/${USER}/.mozilla" "${HOME}/.mozilla"
+
+ # flatpak
+ ln -sfn "/opt/flatpak/${USER}" "${HOME}/.var"
+fi