mirror of
https://github.com/juspay/services-flake.git
synced 2024-10-26 13:09:04 +03:00
d84efa4788
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";
|
|
};
|
|
}
|