summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPiotr Limanowski <plimanowski@codearsonist.com>2017-07-04 21:13:32 +0200
committerPiotr Limanowski <plimanowski@codearsonist.com>2017-07-04 21:13:32 +0200
commit972ee0cb82b2a895ae899d85f30c9378b45efc09 (patch)
tree6d99b909b9390f3665f07dab5b1368ab93b11516 /modules
parent22be8291970d3977ab99d81e5c2c336150f7bd4f (diff)
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/services/emacs.nix9
1 files 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
+}