Tweak profile directory layout

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.
This commit is contained in:
Marien Zwart 2024-03-31 15:44:27 +11:00
parent 6c260297ee
commit ca42470bc7
No known key found for this signature in database

View file

@ -269,11 +269,12 @@ let
echo '
((${profileName} (user-emacs-directory . "${doomSource}")
(doom-profile-data-dir . "'$out'/profiles")
(doom-profile-data-dir . "'$out'/profile")
("DOOMDIR" . "${finalDoomDir}")))
' > profiles.el
export DOOMPROFILELOADFILE=$out/init.el
mkdir $out/loader
export DOOMPROFILELOADFILE=$out/loader/init.el
export DOOMPROFILELOADPATH=$PWD/profiles.el
export DOOMLOCALDIR=$(mktemp -d)
# Prevent error on Emacs shutdown writing empty build cache.
@ -301,7 +302,7 @@ let
}
''
makeWrapper ${emacsWithPackages}/bin/emacs $out/bin/emacs \
--set DOOMPROFILELOADFILE ${doomProfile}/init.el \
--set DOOMPROFILELOADFILE ${doomProfile}/loader/init.el \
--add-flags "--init-directory=${doomSource} --profile ${profileName}"
'';