{ config, pkgs, ... }:
let
  ollamahostname = "llm.kabtop.de";
in
{
  virtualisation.oci-containers.containers."open-webui" = {
    autoStart = true;
    image = "ghcr.io/open-webui/open-webui:ollama";
    volumes = [
      "/var/lib/open-webui:/app/backend/data"
    ];
    hostname = "open-webui";
    ports = [ "8081:8080" ];
  };

  services = {
    nginx = {
      virtualHosts = {
          ${ollamahostname} = {
              enableACME = true;
              forceSSL = true;
              locations."/".proxyPass = "http://localhost:8081";
          };
      };
    };
  };
}