users/infinidoge: fix emacs defaultEditor setup
This commit is contained in:
parent
61fb5814d0
commit
4e50a21bdd
1 changed files with 12 additions and 1 deletions
|
@ -69,7 +69,18 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.emacs.defaultEditor = true;
|
environment.variables.EDITOR =
|
||||||
|
let
|
||||||
|
editorScript = pkgs.writeScriptBin "emacseditor" ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
exec ${pkgs.emacs}/bin/emacsclient --create-frame --alternate-editor ${pkgs.emacs}/bin/emacs
|
||||||
|
else
|
||||||
|
exec ${pkgs.emacs}/bin/emacsclient --alternate-editor ${pkgs.emacs}/bin/emacs "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
(lib.mkOverride 900 "${editorScript}/bin/emacseditor");
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue