Adapted from https://nixos.wiki/wiki/Environment_variables#Configuration, as per https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables.