{ pkgs, ... }@all: with all;
{
  services.ollama = {
    package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama;
    enable = true;
    acceleration = lib.mkIf hyper.nvidia.enable "cuda";
    host = "0.0.0.0";
    port = 11434;
    environmentVariables = {
      OLLAMA_ORIGINS = "*"; 
    };
  };
}
