mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 08:17:01 +00:00
emacs: add path config
This commit is contained in:
parent
56f01699fb
commit
a6b23918a7
1 changed files with 15 additions and 7 deletions
|
@ -6,9 +6,7 @@ let
|
|||
|
||||
cfg = config.services.emacs;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
services.emacs = {
|
||||
enable = mkOption {
|
||||
|
@ -23,6 +21,17 @@ in
|
|||
description = "This option specifies the emacs package to use.";
|
||||
};
|
||||
|
||||
additionalPath = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "/Users/my_user_name" ];
|
||||
description = ''
|
||||
This option specifies additional PATH that the emacs daemon would have.
|
||||
Typically if you have binaries in your home directory that is what you would add your home path here.
|
||||
One caveat is that there won't be shell variable expansion, so you can't use $HOME for example
|
||||
'';
|
||||
};
|
||||
|
||||
exec = mkOption {
|
||||
type = types.str;
|
||||
default = "emacs";
|
||||
|
@ -34,10 +43,9 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
|
||||
launchd.user.agents.emacs = {
|
||||
serviceConfig.ProgramArguments = [
|
||||
"${cfg.package}/bin/${cfg.exec}"
|
||||
"--fg-daemon"
|
||||
];
|
||||
path = cfg.additionalPath ++ [ config.environment.systemPath ];
|
||||
serviceConfig.ProgramArguments =
|
||||
[ "${cfg.package}/bin/${cfg.exec}" "--fg-daemon" ];
|
||||
serviceConfig.RunAtLoad = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue