fix(infinidoge): use programs.emacs.package in $EDITOR

This commit is contained in:
Infinidoge 2022-09-18 02:12:36 -04:00
parent 949bc12a9c
commit e246ec23fa

View file

@ -57,12 +57,13 @@ in
environment.variables.EDITOR = environment.variables.EDITOR =
let let
pkg = config.home-manager.users.infinidoge.programs.emacs.package;
editorScript = pkgs.writeScriptBin "emacseditor" '' editorScript = pkgs.writeScriptBin "emacseditor" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
if [ -z "$1" ]; then if [ -z "$1" ]; then
exec ${pkgs.emacs}/bin/emacsclient --create-frame --alternate-editor ${pkgs.emacs}/bin/emacs exec ${pkg}/bin/emacsclient --create-frame --alternate-editor ${pkg}/bin/emacs
else else
exec ${pkgs.emacs}/bin/emacsclient --alternate-editor ${pkgs.emacs}/bin/emacs "$@" exec ${pkg}/bin/emacsclient --alternate-editor ${pkg}/bin/emacs "$@"
fi fi
''; '';
in in