8 meta.maintainers = with lib.maintainers; [ abysssol ];
14 services.ollama.enable = true;
20 services.ollama.enable = true;
21 services.ollama.port = altPort;
28 def curl_request_ollama(prompt, port):
29 json_prompt = json.dumps(prompt)
30 return f"""curl http://127.0.0.1:{port}/api/generate -d '{json_prompt}'"""
33 "model": "tinydolphin",
34 "prompt": "lorem ipsum",
43 (cpu, ${toString mainPort}),
44 (altAddress, ${toString altPort}),
48 for (vm, port) in vms:
49 vm.wait_for_unit("multi-user.target")
50 vm.wait_for_open_port(port)
51 stdout = vm.succeed(curl_request_ollama(prompt, port), timeout = 100)