home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 791d4692a003b259c8a86e5f992290789041627d
parent da1ab0368e353af64b2e67252122f6e9d6127d35
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Tue, 12 May 2020 12:47:20 +0200

services.emacs: fix daemon name

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mmodules/profiles/emacs.nix | 3++-
Mmodules/services/emacs-server.nix | 7++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/profiles/emacs.nix b/modules/profiles/emacs.nix @@ -176,8 +176,9 @@ in services.emacs-server = { enable = true; package = myEmacs; + name = "org"; shell = pkgs.zsh + "/bin/zsh -i -c"; - extraOptions = "--dump-file=${config.home.homeDirectory}/.config/emacs/emacs.pdmp --daemon=org"; + extraOptions = "--dump-file=${config.home.homeDirectory}/.config/emacs/emacs.pdmp"; }; } ) diff --git a/modules/services/emacs-server.nix b/modules/services/emacs-server.nix @@ -6,6 +6,11 @@ in { options.services.emacs-server = { enable = mkEnableOption "the Emacs daemon"; + name = mkOption { + type = types.str; + description = "Name of the emacs server"; + default = "default"; + }; package = mkOption { type = types.package; description = "The Emacs package to use for running the daemon."; @@ -39,7 +44,7 @@ in Service = { ExecStart = - "${cfg.shell} 'exec ${cfg.package}/bin/emacs --fg-daemon ${cfg.extraOptions}'"; + "${cfg.shell} 'exec ${cfg.package}/bin/emacs --fg-daemon=${cfg.name} ${cfg.extraOptions}'"; ExecStop = "${cfg.package}/bin/emacsclient --eval '(kill-emacs)'"; Restart = "on-failure"; };