Set doom-local-dir
Although not used much with doomProfile set, the default (.local in the Doom source tree) will not work. Currently straight-base-dir ends up relative to this, although that may change.
This commit is contained in:
parent
b7b306da0c
commit
8a36d1e188
2 changed files with 18 additions and 3 deletions
14
doom.nix
14
doom.nix
|
|
@ -1,6 +1,19 @@
|
|||
{
|
||||
/* DOOMDIR / Doom private directory / module. */
|
||||
doomDir,
|
||||
/* Default DOOMLOCALDIR.
|
||||
*
|
||||
* Required, because the default is relative to Doom's source tree,
|
||||
* which is read-only.
|
||||
*
|
||||
* Expanded using expand-file-name (an initial ~ is supported,
|
||||
* shell variable expansion is not).
|
||||
*
|
||||
* DOOMLOCALDIR in the environment Emacs is started with overrides this.
|
||||
*
|
||||
* Suggested value: ~/.local/share/doom
|
||||
*/
|
||||
doomLocalDir,
|
||||
/* Doom source tree. */
|
||||
doomSource,
|
||||
/* Emacs package to build against. */
|
||||
|
|
@ -295,6 +308,7 @@ let
|
|||
''
|
||||
makeWrapper ${emacsWithPackages}/bin/emacs $out/bin/${binaryName} \
|
||||
--set DOOMPROFILELOADFILE ${doomProfile}/loader/init.el \
|
||||
--set-default DOOMLOCALDIR "${doomLocalDir}" \
|
||||
--add-flags "--init-directory=${doomSource} --profile ${profileName}"
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -20,14 +20,15 @@
|
|||
packages = perSystemPackages (pkgs:
|
||||
let
|
||||
common = { doomSource = doomemacs; emacs = pkgs.emacs29-pgtk; };
|
||||
commonDemos = common // { doomLocalDir = "~/.local/share/nix-doom-unstraightened"; };
|
||||
pkgsWithEmacsOverlay = pkgs.extend emacs-overlay.overlays.package;
|
||||
in {
|
||||
# Current Doom + NixOS 23.11 requires emacs-overlay: Doom pins
|
||||
# emacs-fish-completion, which moved from gitlab to github recently
|
||||
# enough stable nixpkgs pulls it from the wrong source.
|
||||
doom-minimal = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { doomDir = pkgs.emptyDirectory; });
|
||||
doom-full = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { full = true; doomDir = pkgs.emptyDirectory; });
|
||||
doom-example = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { doomDir = ./example; });
|
||||
doom-minimal = pkgsWithEmacsOverlay.callPackage ./doom.nix (commonDemos // { doomDir = pkgs.emptyDirectory; });
|
||||
doom-full = pkgsWithEmacsOverlay.callPackage ./doom.nix (commonDemos // { full = true; doomDir = pkgs.emptyDirectory; });
|
||||
doom-example = pkgsWithEmacsOverlay.callPackage ./doom.nix (commonDemos // { doomDir = ./example; });
|
||||
doomEmacs = args: pkgsWithEmacsOverlay.callPackage ./doom.nix (common // args);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue