From 893d31d52c3940c02a6f8bcac4f6ce80c2c8ab66 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sat, 6 Apr 2024 08:39:22 +0200 Subject: [PATCH] server: add ollama --- modules/services/server/default.nix | 3 ++- modules/services/server/ollama.nix | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 modules/services/server/ollama.nix diff --git a/modules/services/server/default.nix b/modules/services/server/default.nix index 420a382..1770bd0 100644 --- a/modules/services/server/default.nix +++ b/modules/services/server/default.nix @@ -17,7 +17,8 @@ ./nextcloud.nix ./matrix.nix ./coturn.nix - #./jitsi.nix + ./jitsi.nix + #./ollama.nix ] # picom, polybar and sxhkd are pulled from desktop module diff --git a/modules/services/server/ollama.nix b/modules/services/server/ollama.nix new file mode 100644 index 0000000..926ac2e --- /dev/null +++ b/modules/services/server/ollama.nix @@ -0,0 +1,23 @@ + +{ config, pkgs, ... }: +let + ollamahostname = "llm.kabtop.de"; +in +{ + services.ollama = { + enable = true; + listenAddress = "127.0.0.1:11434"; + }; + + services.nginx = { + virtualHosts = { + ollamahostname = { + enableACME = true; + forceSSL = true; + listen = [ { + addr = "127.0.0.1"; port = 11434; + } ]; + }; + }; + }; +}