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 fi
rm $out/doomdir/init.el rm $out/doomdir/init.el
if [[ -z "$profileName" ]]; then if [[ -z "$profileName" ]]; then
setProfile="(setq doom-profile-dir \"$out/profile\")" maybeSetProfileDir="(setq doom-profile-dir \"$out/profile\")"
else else
setProfile="" maybeSetProfileDir=""
fi fi
substitute $initEl $out/doomdir/init.el \ substitute $initEl $out/doomdir/init.el \
--subst-var-by maybe-set-profile-dir "$setProfile" \ --subst-var maybeSetProfileDir \
--subst-var-by profile-name "$profileName" \ --subst-var profileName \
--subst-var-by user-init "$doomDir/init.el" \ --subst-var-by userInit "$doomDir/init.el" \
--subst-var-by straight-base-dir $out --subst-var-by straightBaseDir $out
ln -sf $doomIntermediates/packages.el $out/doomdir/ ln -sf $doomIntermediates/packages.el $out/doomdir/
export DOOMDIR=$out/doomdir export DOOMDIR=$out/doomdir

View file

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