emacs: Create a shell script instead of an alias 'e'

This commit is contained in:
Alexander Kobjolke 2024-02-04 16:11:03 +01:00
parent fd479fbd1a
commit 6d49c9127d

View file

@ -1,11 +1,14 @@
{ inputs, config, lib, pkgs, ... }: { inputs, config, lib, pkgs, ... }:
let
{ emacsclient-wrapper = pkgs.writeShellScriptBin "e" ''
exec ${pkgs.emacs}/bin/emacsclient --reuse-frame --no-wait "$@"
'';
in {
nixpkgs.overlays = [ inputs.emacs.overlay ]; nixpkgs.overlays = [ inputs.emacs.overlay ];
home = { home = {
sessionPath = [ "$HOME/.emacs.d/bin" ]; sessionPath = [ "$HOME/.emacs.d/bin" ];
shellAliases = { e = "emacsclient -c $@"; }; packages = [ emacsclient-wrapper ];
}; };
programs.emacs = { programs.emacs = {