Disable doom-initialize-core-packages at runtime

...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...
This commit is contained in:
Marien Zwart 2024-04-08 21:11:36 +10:00
parent 4ec01fc08c
commit 4f0f6fc607
No known key found for this signature in database
3 changed files with 19 additions and 9 deletions

View file

@ -20,6 +20,7 @@
linkFarm,
runCommand,
runtimeShell,
concatText,
writeText,
makeBinaryWrapper,
}:
@ -230,6 +231,8 @@ let
emacsWithPackages = doomEmacsPackages.emacsWithPackages (epkgs: (map (p: epkgs.${p}) (builtins.attrNames doomPackageSet)));
# Step 4: build a final DOOMDIR with packages.el from step 1.
finalInitFile = concatText "doom-init" [ ./pre-init.el doomInitFile ];
finalDoomDir = runCommand "doom-dir" {} ''
mkdir $out
if [[ -n "$(ls -A1 ${doomDir})" ]]; then
@ -239,6 +242,7 @@ let
if ! [[ -e $out/snippets ]]; then
mkdir $out/snippets
fi
ln -sf ${finalInitFile} $out/init.el
ln -sf ${doomIntermediates}/packages.el $out/
ln -sf ${./cli2.el} $out/cli.el
'';