+8
-3
nix/darwin.nix
+8
-3
nix/darwin.nix
···
14
14
];
15
15
16
16
launchd.user.agents = {
17
-
# reference: https://www.danielcorin.com/til/nix-darwin/launch-agents/
17
+
# reference:
18
+
# - https://www.danielcorin.com/til/nix-darwin/launch-agents/
19
+
# - https://medium.com/@anand34577/setting-up-ollama-as-a-background-service-on-macos-66f7492b5cc8
18
20
ollama-serve = {
19
-
command = "${pkgs.ollama}/bin/ollama serve";
20
21
serviceConfig = {
21
-
# Label = "com.ollama.serve";
22
+
Label = "com.ollama.serve";
23
+
ProgramArguments = [ "${pkgs.ollama}/bin/ollama" "serve" ];
22
24
KeepAlive = true;
23
25
RunAtLoad = true;
26
+
# TODO: ensure /var/log/ollama exist
27
+
# StandardOutPath = "/var/log/ollama/stdout.log";
28
+
# StandardErrorPath = "/var/log/ollama/stderr.log";
24
29
StandardOutPath = "/tmp/ollama_boltless.log";
25
30
StandardErrorPath = "/tmp/ollama_boltless.err";
26
31
};