mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-11 20:37:10 +03:00
ported from https://github.com/shivaraj-bh/ollama-flake/blob/main/services/ollama.nix Also see the nixos module: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/ollama.nix
17 lines
436 B
Nix
17 lines
436 B
Nix
{ pkgs, ... }: {
|
|
services.ollama."ollama1".enable = true;
|
|
|
|
# Cannot test auto-loading models yet because that requires internet connection.
|
|
settings.processes.test =
|
|
{
|
|
command = pkgs.writeShellApplication {
|
|
runtimeInputs = [ pkgs.curl ];
|
|
text = ''
|
|
curl http://127.0.0.1:11434
|
|
'';
|
|
name = "ollama-test";
|
|
};
|
|
depends_on."ollama1".condition = "process_healthy";
|
|
};
|
|
}
|