Skip to content

Commit

Permalink
Adjust default.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Feb 25, 2023
1 parent 7a9b569 commit 6bfdab8
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,6 @@ let
'';
in (emacsPackages.emacsWithPackages (epkgs: [ load-config-from-site ]));

# create a `emacs.d` dir to be loaded using `--init-directory` flag from Emacs 29+
# this will allow proper usage of `early-init.el`, fixing FOUC issues and improving
# startup performance
emacs-dir = runCommand "emacs-dir" { } ''
mkdir -p $out
cat > $out/early-init.el << EOF
(load "${doom-emacs}/early-init.el")
EOF
cat > $out/init.el << EOF
(load "default.el")
EOF
'';

build-summary = writeShellScript "build-summary" ''
printf "\n${fmt.green}Successfully built nix-doom-emacs!${fmt.reset}\n"
printf "${fmt.bold} ==> doom-emacs is installed to ${doom-emacs}${fmt.reset}\n"
Expand All @@ -263,7 +250,7 @@ in emacs.overrideAttrs (esuper:
# `--init-directory` is supported by Emacs 29+ only
initDirArgs = lib.optionalString isEmacs29 ''
if [[ $(basename $1) == emacs ]] || [[ $(basename $1) == emacs-* ]]; then
wrapArgs+=(--add-flags '--init-directory ${emacs-dir}')
wrapArgs+=(--add-flags '--init-directory ${doom-emacs}')
fi
'';
cmd = ''
Expand Down

0 comments on commit 6bfdab8

Please sign in to comment.