Skip to content

Instantly share code, notes, and snippets.

@maxi0604
Created December 3, 2023 20:38
Show Gist options
  • Save maxi0604/c38bbf1a22700d7bd75a9f2f60e95a2d to your computer and use it in GitHub Desktop.
Save maxi0604/c38bbf1a22700d7bd75a9f2f60e95a2d to your computer and use it in GitHub Desktop.
Put this in /etc/profile.d to clean up your home directory a bit. I may add more of these as I discover them. Some of these may imply changes in other places like .zshrc / .bashrc ...
# Go
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export GOMODCACHE="${XDG_CACHE_HOME:-$HOME/.cache}/go/mod"
# Rust (Cargo)
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
# OCaml (Opam)
export OPAMROOT="${XDG_DATA_HOME:-$HOME/.local/share}/opam"
# Python
export PYTHONUSERBASE="${XDG_DATA_HOME:-$HOME/.local/share}/python"
export PYTHONPYCACHEPREFIX="${XDG_CACHE_HOME:-$HOME/.cache}/python"
# Julia
export JULIA_DEPOT_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/julia:$JULIA_DEPOT_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment