Although not used much with doomProfile set, the default (.local in the
Doom source tree) will not work.
Currently straight-base-dir ends up relative to this, although that may
change.
...by moving the existing hack from the CLI to init.el.
It's not really necessary to do this as early as init.el, but I'm coming
around to using init.el modifications as an alternative to using Doom's
profile loader. So we might as well do this in the same place.
This is not sufficient to make doom/help-packages work, but gets us one
step closer...
Having this empty only really makes sense for minimal/full test builds.
Also, /var/empty was not doing what it looks like (it's not accessible
from inside the build sandbox). Use nixpkgs's emptyDirectory instead.
Writing profiles.el was borderline unreadable.
`doom-profiles-autodetect` was effectively just reading in the entire
file: accepting the paths we want in the profile as individual args and
putting them together on the Emacs side is easy enough.
Accidentally fixes a bug: `user-emacs-directory` should end in a
directory separator. We now get the right value for free by using the
path we're running Doom CLI out of.
doom-profile-data-dir is for the current profile, naming it
"profiles" (plural) made no sense.
Also move the loader into its own subdir so it's more obvious what the
two init.29.elc files are.