36 lines
582 B
Nix
36 lines
582 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.service.selfhost.ollama;
|
|
in
|
|
{
|
|
config = lib.mkIf cfg {
|
|
services = {
|
|
ollama = {
|
|
enable = true;
|
|
loadModels = [
|
|
"mistral:7b"
|
|
];
|
|
acceleration = false;
|
|
};
|
|
|
|
open-webui = {
|
|
enable = true;
|
|
port = 13007;
|
|
};
|
|
nginx.virtualHosts."ollama.enium.eu" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:13007";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|