Prefer --subst-var over --subst-var-by

Rename a few other template vars to remain consistent.
This commit is contained in:
Marien Zwart 2024-06-01 21:22:17 +10:00
parent 48c4531e2e
commit ce63f7f54a
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -325,15 +325,15 @@ let
fi
rm $out/doomdir/init.el
if [[ -z "$profileName" ]]; then
setProfile="(setq doom-profile-dir \"$out/profile\")"
maybeSetProfileDir="(setq doom-profile-dir \"$out/profile\")"
else
setProfile=""
maybeSetProfileDir=""
fi
substitute $initEl $out/doomdir/init.el \
--subst-var-by maybe-set-profile-dir "$setProfile" \
--subst-var-by profile-name "$profileName" \
--subst-var-by user-init "$doomDir/init.el" \
--subst-var-by straight-base-dir $out
--subst-var maybeSetProfileDir \
--subst-var profileName \
--subst-var-by userInit "$doomDir/init.el" \
--subst-var-by straightBaseDir $out
ln -sf $doomIntermediates/packages.el $out/doomdir/
export DOOMDIR=$out/doomdir

View file

@ -17,7 +17,7 @@
;; Extra initialization code for nix-doom-emacs-unstraightened, run before the
;; normal `init.el'.
@maybe-set-profile-dir@
@maybeSetProfileDir@
(defadvice! nix-doom-skip-core-packages (&rest _)
"HACK: don't install straight and core packages.
@ -34,7 +34,7 @@ it. Just skip it entirely."
(straight--load-build-cache))
(after! doom-packages
(setq straight-base-dir "@straight-base-dir@"))
(setq straight-base-dir "@straightBaseDir@"))
(defadvice! unstraightened-profile-init-file (&optional profile-id version)
"Return unstraightened's profile init file.
@ -47,7 +47,7 @@ or unstraightened profile (erroring out otherwise), then return the custom path.
Returning the unstraightened profile if the default profile is
requested makes `doom doctor' work."
:override #'doom-profile-init-file
(let ((my-profile "@profile-name@"))
(let ((my-profile "@profileName@"))
(unless (or (null profile-id)
(and (not (string-empty-p my-profile))
(string-equal profile-id my-profile)))
@ -80,4 +80,4 @@ requested makes `doom doctor' work."
,(read flycheck-emacs-lisp-check-form))))
;; Load the user's init.el.
(load "@user-init@" nil 'nomessage)
(load "@userInit@" nil 'nomessage)