feat(jeeves)!: re-enable ollama
and expose it through nginx
This commit is contained in:
parent
479c86c003
commit
eddd9be861
2 changed files with 25 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
||||||
# ./home-assistant
|
# ./home-assistant
|
||||||
./samba.nix
|
./samba.nix
|
||||||
# ./steam.nix
|
# ./steam.nix
|
||||||
# ./ollama.nix
|
./ollama.nix
|
||||||
# ./sunshine.nix
|
# ./sunshine.nix
|
||||||
# ./photoprism.nix
|
# ./photoprism.nix
|
||||||
# ./immich.nix
|
# ./immich.nix
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ inputs, lib, pkgs, config, ... }:
|
{ inputs, lib, pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [11434];
|
# NOTE: no need now (nginx)
|
||||||
|
# networking.firewall.allowedTCPPorts = [11434];
|
||||||
|
|
||||||
services.ollama = {
|
services.ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -8,7 +9,17 @@
|
||||||
port = 11434;
|
port = 11434;
|
||||||
acceleration = "rocm";
|
acceleration = "rocm";
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
OLLAMA_ORIGINS = "*";
|
# NOTE: no need now (nginx), should be only `127.0.0.1`
|
||||||
|
# OLLAMA_ORIGINS = "*";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."ollama.jeeves.local" = {
|
||||||
|
enableACME = false;
|
||||||
|
forceSSL = false;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${builtins.toString config.services.ollama.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,6 +36,16 @@
|
||||||
# Disable authentication
|
# Disable authentication
|
||||||
WEBUI_AUTH = "False";
|
WEBUI_AUTH = "False";
|
||||||
};
|
};
|
||||||
openFirewall = true;
|
# NOTE: no need now (nginx)
|
||||||
|
# openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."openwebui.jeeves.local" = {
|
||||||
|
enableACME = false;
|
||||||
|
forceSSL = false;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${builtins.toString config.services.open-webui.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue