Quirks resulting from mounting an NFS at $HOME
While mounting our NFS at /home/ is convenient for users to share their data
between machines relatively transparently, there are some issues that crop up
from time to time. I want to document a list of these issues and mitigations
that I’ve come up with, so I’ll put that here.
opamcan’t enable switches: It seems thatopamis not designed to run on an NFS, or maybe more precisely, our NFS has too high latency foropamto work well. As such, putting yourOPAMROOTon a different filesystem (namely/scratch) is recommended. This can be done by adding the following line to your.bashrc,.zshrc, etc:export OPAMROOT=/scratch/$USER/.opamAlternatively, you can check out something like
nfsopam.sh.ghcviaghcup:ghcupis the recommended tool to manageghcversions. Upon install, it reads the environment variableGHCUP_INSTALL_BASE_PREFIX, which allows you to select an alternative base installation location, probably a good idea, because Haskell compilation is already slow enough. Notably, this needs to be set when runningghcupcommands as well as during install, so it is best to put this in your.bashrc/.zshrc/etc:export GHCUP_INSTALL_BASE_PREFIX=/scratch/$USER