Prefer --subst-var over --subst-var-by
Rename a few other template vars to remain consistent.
This commit is contained in:
parent
48c4531e2e
commit
ce63f7f54a
2 changed files with 10 additions and 10 deletions
12
default.nix
12
default.nix
|
|
@ -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
|
||||
|
||||
|
|
|
|||
8
init.el
8
init.el
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue