1
0
Fork 0

Services: initial work on Ollama

This commit is contained in:
Aires 2024-12-15 14:54:34 -05:00
parent f4cc132c6e
commit 2410d7f980
2 changed files with 204 additions and 108 deletions

View file

@ -1,108 +1,111 @@
U2FsdGVkX1/3LlNROkyPB55ey2D5yiYCLes7fqjs1fGwFdSJZ3FUryzQFXdK0Dv4 U2FsdGVkX19jc0EXrCq2pkLPHkGjcP6HS2zcce44wjkE1e9QfqmzY+QFjzlvWpZx
g12DJQp0QyKD2SShoI75cFTfA+QltBU7aFGv4mFKQfA/Im6eUwLRJfb/3hkDy4Uj S7jfoa5FDQXep185z3aMC9iB3x5hmA8LZttVZcmigrj79Yu0DpT95qV/rL1z8SFS
eI911kmh0TpYYGz/4TOItXVVXG4/TbiU3//e1DXzGwdGBblRW/+A2GtKZaJ/ska3 S8Qx9IjQUIFnMvVETbF/YrtRmMuFPOYXPCMFOEIT9jhgBi8p02x36JCydaEPkEpx
IJJa9J1LnSeMZRQVThb9k4VMLjMLoQiAdoVG6ExcuzLWUT77xkcVMNlAtRF6gtiM jqnMDYKfhSxm4DSdDNllg9IMsdrzhWn3yfUi5t00cFUL6TgQ1u6oftUDlpORSK0I
Yt3VZvcKPzxSS/Ij2woh5ELCCNF9HpFnfbt8F54ObpoW3UssuFGPb8Rd/htV+HR3 D5ARxDJdgZipktA0aosbobcMmXxPpRhxG24NbWSsIS2eRNmq7ex8En8+TJGE+fjV
9bWqEE/H/0ucfiI+8tSxUC8eHSU3U6uVkJsHIaQEQ2d1fJ82FiLAfiWQcQWgM3VO rMHw50sICIOSvY7Wms2f+C/ZyQefSankKCySsopnP/GPtXWInQ4f4bsAJtJanwA0
cZN7PJ6uTlByEdsOPY1HIel50I9Y/oNS+1dcvVQ/Lpdouae8phcteJL1rcKJR2DO Y29pRm6y7HVDyV8E74pTsrDiegPhAYKgWLfW6x1Klp+IH2cgLHAXvEF4c+AefjIn
spVb7J8wp18fpqXnJmg5kY3rCmKNNb6tiKG6Fnq8NeUF38hhz0GEm/q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ZgLWKeQnaj+wJfft2Y= 0Iivr7OaBzZcqQTso9KaD01sgJjXuU9thZLwbgMFZiiFdVBGnfYeZWf+/pHoQIkR
wJRrX7jMPcbYudKrPmox6MagByfdGUOnws2R5aB2xr7w17MZzP78AZNlEcu86CGZ
O42KOd6W3jt+anMFKsa6mUfCHJoAwyxTf2+1Tx9bFF2C4DOta7fJgrBKmWsywQ49
a65GAwmUmDsDTA0Bj7Nsx7u+HZFJKTJ8v7ygzV8KaNUMbdO4W65LommseT9ryP42

View file

@ -0,0 +1,93 @@
{
pkgs,
config,
lib,
namespace,
...
}:
let
cfg = config.${namespace}.services.ollama;
api.port = 11434;
webui.port = 8130;
in
{
options = {
${namespace}.services.ollama = {
enable = lib.mkEnableOption "Enables Ollama.";
auth = {
password = lib.mkOption {
default = "";
type = lib.types.str;
description = "The password to use for authentication.";
example = "MySuperSecurePassword123";
};
user = lib.mkOption {
default = "ltuser";
type = lib.types.str;
description = "The username to use for authentication.";
};
};
home = lib.mkOption {
default = "";
type = lib.types.str;
description = "Where to store Ollama's files";
example = "/var/lib/ollama";
};
url = lib.mkOption {
default = "";
type = lib.types.str;
description = "The complete URL where Ollama is hosted.";
example = "https://ollama.example.com";
};
};
};
config = lib.mkIf cfg.enable {
services = {
ollama = {
enable = true;
acceleration =
with config.${namespace}.gpu;
if amd.enable then
"rocm"
else if nvidia.enable then
"cuda"
else
false;
home = cfg.home;
};
open-webui = {
enable = true;
port = webui.port;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:${
builtins.toString config.${namespace}.services.ollama.port
}";
};
stateDir = "${cfg.home}/open-webui";
};
nginx.virtualHosts."${cfg.url}" = {
useACMEHost = lib.${namespace}.getDomainFromURI cfg.url;
forceSSL = true;
basicAuth = {
"${cfg.auth.user}" = cfg.auth.password;
};
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString api.port}";
extraConfig = "proxy_ssl_server_name on;";
};
};
};
systemd.services = {
ollama.unitConfig.RequiresMountsFor = cfg.home;
nginx.wants = [ config.systemd.services.ollama.name ];
};
};
}