1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00

Update serviceConfig for ollama service

This commit is contained in:
Velnbur 2024-06-17 19:34:30 +03:00
parent 2816d8afd3
commit b0934dcc90
No known key found for this signature in database

View file

@ -82,14 +82,18 @@ in {
launchd.user.agents.ollama = {
path = [ config.environment.systemPath ];
environment = cfg.environmentVariables // {
HOME = cfg.home;
OLLAMA_MODELS = cfg.models;
OLLAMA_HOST = "${cfg.host}:${toString cfg.port}";
};
serviceConfig = {
KeepAlive = true;
RunAtLoad = true;
ProcessType = "Background";
ProgramArguments = [ "${cfg.package}/bin/ollama" "serve" ];
serviceConfig.ProgramArguments = [ "${cfg.package}/bin/ollama" "serve" ];
serviceConfig.RunAtLoad = true;
EnvironmentVariables = cfg.environmentVariables // {
HOME = cfg.home;
OLLAMA_MODELS = cfg.models;
OLLAMA_HOST = "${cfg.host}:${toString cfg.port}";
};
};
};
};
}