I just hate the fact that any program could make an educated guess about what software I use, by inspecting the environment.
There are already 75 environment variables set in a fresh shell, only a handfull of them are under my control, most of them are just from the system. Some others are because nixos and HM want to avoid re-sourcing their environment files.
I think it is weird that everyone wants to try to move “hidden” folders away from
$HOME, but at the same time doesn’t care for poluted environments.
XDG_* exists to have a handful of variables to specify the location for everything! Not to derive thousand other variables.
Your module would even add variables I’d never need, like Ruby, Postgress, Java, etc.
And I have to inspect the environment so much more often than my home folder…
You are right, the added variables wouldn’t be visible within the build, though doing
nix build is not how I develop my software.
Most of the time I use just
mkShell to give me the languages tooling and some libraries and then use the languages “native” tooling with imperative commands to develop the application, writing a nix expression for the software in development is rarely necessary as nixos is not a target system for the software I develop in my job.
Another point is that most of the non XDG conforming variables that toolchains give you just mix configuration, cache and data. Having those 3 mixed up makes backups hard, and currently I have my backups (nearly) not backing up known cache locations. The last one I know about I have to get rid of would be chromes cache, as that is also living in
~/.config. I just haven’t had taken the time so far to identify the exact exclude pattern.