refactor(architect/llm.nix): update configuration to use config
for host and port
This commit is contained in:
parent
4285da55bf
commit
d7a3a3bcf3
@ -1,9 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
backendDomain = "ollama.giugl.io";
|
||||
ollamaHost = "127.0.0.1";
|
||||
ollamaPort = 11434;
|
||||
frontendDomain = "llm.giugl.io";
|
||||
ollamaPkg = pkgs.unstablePkgs.ollama-cuda;
|
||||
in
|
||||
{
|
||||
@ -15,8 +14,6 @@ in
|
||||
enable = true;
|
||||
|
||||
package = ollamaPkg;
|
||||
host = ollamaHost;
|
||||
port = ollamaPort;
|
||||
acceleration = "cuda";
|
||||
environmentVariables = {
|
||||
OLLAMA_FLASH_ATTENTION = "1";
|
||||
@ -29,15 +26,15 @@ in
|
||||
dnsInterfaces = [ "tailscale" "lan" ];
|
||||
|
||||
locations."/" = {
|
||||
host = ollamaHost;
|
||||
port = ollamaPort;
|
||||
host = config.services.ollama.host;
|
||||
port = config.services.ollama.port;
|
||||
allowLan = true;
|
||||
allowWAN = true;
|
||||
recommendedProxySettings = false;
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_set_header Host localhost:${toString ollamaPort};
|
||||
proxy_set_header Host localhost:${toString config.services.ollama.host};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user