1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

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.
This commit is contained in:
Piotr Limanowski 2017-07-04 21:13:32 +02:00
parent 22be829197
commit 972ee0cb82
No known key found for this signature in database
GPG key ID: 84BF89CBCB2BDE10

View file

@ -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;
};
};
}
}