From 972ee0cb82b2a895ae899d85f30c9378b45efc09 Mon Sep 17 00:00:00 2001 From: Piotr Limanowski Date: Tue, 4 Jul 2017 21:13:32 +0200 Subject: [PATCH] Adds service.emacs.exec to choose emacs binary to execute The motivation of the change is that some forks (ie. Wilfred/remacs) choose not to use the emacs binary. Whereas it is perfectly possible to generate /bin/emacs in a drv, but I strongly believe it's cleaner to have a service parameter. --- modules/services/emacs.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/services/emacs.nix b/modules/services/emacs.nix index 21f4f8c..7e8354a 100644 --- a/modules/services/emacs.nix +++ b/modules/services/emacs.nix @@ -24,6 +24,11 @@ in description = "This option specifies the emacs package to use."; }; + exec = mkOption { + type = types.string; + default = "emacs"; + description = "Emacs command/binary to exeucte"; + }; }; }; @@ -31,11 +36,11 @@ in launchd.user.agents.emacs = { serviceConfig.ProgramArguments = [ - "${cfg.package}/bin/emacs" + "${cfg.package}/bin/${cfg.exec}" "--daemon" ]; serviceConfig.RunAtLoad = true; }; }; -} \ No newline at end of file +}