Commit graph

6 commits

Author SHA1 Message Date
Marien Zwart
310cadf813
Fix flycheck in emacs-lisp buffers
Doom hooks into flycheck's emacs-lisp checker to load itself. This does
not involve its profile loader, so this bypasses our profile dir
customization.

Hook into this hook to add that customization back.
2024-05-09 21:24:13 +10:00
Marien Zwart
6b8ff7b693
Advice doom-profile-init-file to use our profile
`doom-start` locates the profile init file relative to
`doom-profile-dir` when running interactively, which we customize (either
directly or by setting `doom-profile-data-dir`). But when running
noninteractively, it uses `doom-profile-init-file`, which always loads
relative to `doom-data-dir`.

We cannot point `doom-data-dir` into the store, so this breaks us.

Work around it by advicing `doom-profile-data-dir` to locate the init
file relative to `doom-profile-dir` too. Try to make this more safe by
erroring out if called on a non-default profile.

All of this feels questionable, but I really want `doom doctor` to
work...
2024-04-28 20:11:51 +10:00
Marien Zwart
24ee7b6838
Actually load straight when asked to initialize it
`straight--load-build-cache` is not autoloaded, so we fail if it has not
been loaded yet. Apparently it usually is when we hit this override
interactively, but Doom CLI can call our override early enough we need
this.
2024-04-28 20:09:06 +10:00
Marien Zwart
87267ca824
Make profile loader optional
Not heavily tested, but seems to work.
2024-04-28 18:59:38 +10:00
Marien Zwart
603c36e90c
Simplify setting straight-base-dir
Instead of passing the path down from the profile loader to init.el,
just substitute the path into init.el.

This requires moving DOOMDIR generation into the same derivation as
profile build to avoid a circular dependency.
2024-04-28 17:33:43 +10:00
Marien Zwart
2babb2ed6a
Chain-load user init.el instead of embedding it
Mostly to avoid sticking our copyright header on top of the user's
init.el.
2024-04-28 15:23:31 +10:00
Renamed from pre-init.el (Browse further)