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
|
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
|
||||||
|
|
||||||
|
|
|
||||||
8
init.el
8
init.el
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue