Compare commits
5 Commits
4f6d409e85
...
e98f915103
Author | SHA1 | Date | |
---|---|---|---|
|
e98f915103 | ||
|
068a42db62 | ||
|
1542d67202 | ||
|
d7a3a3bcf3 | ||
|
4285da55bf |
@ -41,6 +41,7 @@ in
|
||||
./postgres.nix
|
||||
./netdata.nix
|
||||
./homeassistant.nix
|
||||
./searx.nix
|
||||
];
|
||||
|
||||
age.identityPaths = [ "/root/.ssh/id_ed25519" ];
|
||||
|
@ -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
|
||||
{
|
||||
@ -11,12 +10,11 @@ in
|
||||
systemPackages = [ ollamaPkg ];
|
||||
};
|
||||
|
||||
services.ollama = {
|
||||
services = {
|
||||
ollama = {
|
||||
enable = true;
|
||||
|
||||
package = ollamaPkg;
|
||||
host = ollamaHost;
|
||||
port = ollamaPort;
|
||||
acceleration = "cuda";
|
||||
environmentVariables = {
|
||||
OLLAMA_FLASH_ATTENTION = "1";
|
||||
@ -25,20 +23,34 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
open-webui.enable = true;
|
||||
};
|
||||
|
||||
architect.vhost.${backendDomain} = {
|
||||
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};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
architect.vhost.${frontendDomain} = {
|
||||
dnsInterfaces = [ "tailscale" "lan" ];
|
||||
|
||||
locations."/" = {
|
||||
host = config.services.open-webui.host;
|
||||
port = config.services.open-webui.port;
|
||||
allowLan = true;
|
||||
allowWAN = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ in
|
||||
safe_search = 0;
|
||||
autocomplete = "google";
|
||||
prefer_configured_language = false;
|
||||
formats = [ "html" "json"];
|
||||
};
|
||||
|
||||
ui = {
|
||||
@ -41,10 +42,9 @@ in
|
||||
engines = [
|
||||
{ name = "google"; disabled = false; }
|
||||
{ name = "bing"; disabled = false; }
|
||||
{ name = "qwant"; disabled = false; }
|
||||
{ name = "brave"; disabled = false; }
|
||||
# keep getting access denied (!?)
|
||||
{ name = "duckduckgo"; disabled = true; }
|
||||
{ name = "qwant"; disabled = true; }
|
||||
{ name = "brave"; disabled = true; }
|
||||
{ name = "duckduckgo"; disabled = false; }
|
||||
];
|
||||
};
|
||||
};
|
||||
@ -55,7 +55,7 @@ in
|
||||
locations."/" = {
|
||||
port = config.services.searx.settings.server.port;
|
||||
allowLan = true;
|
||||
|
||||
allowWAN = true;
|
||||
allow = [
|
||||
tailscale.net
|
||||
];
|
||||
|
@ -109,7 +109,7 @@ in
|
||||
apps = [
|
||||
{
|
||||
name = "Steam w/ Hue Lights";
|
||||
cmd = ''${pkgs.bash}/bin/bash -c "${pkgs.gamescope}/bin/gamescope --immediate-flips --rt -C 3000 -f -e -W ''${SUNSHINE_CLIENT_WIDTH} -H ''${SUNSHINE_CLIENT_HEIGHT} -r ''${SUNSHINE_CLIENT_FPS} -- ${pkgs.steam}/bin/steam -pipewire"'';
|
||||
cmd = ''${pkgs.bash}/bin/bash -c "${pkgs.gamescope}/bin/gamescope --adaptive-sync --force-composition --immediate-flips --rt -C 3000 -f -e -W ''${SUNSHINE_CLIENT_WIDTH} -H ''${SUNSHINE_CLIENT_HEIGHT} -r ''${SUNSHINE_CLIENT_FPS} -- ${pkgs.steam}/bin/steam -pipewire"'';
|
||||
detached = [
|
||||
"${pkgs.pepePkgs.huenicorn}/bin/huenicorn"
|
||||
];
|
||||
@ -122,7 +122,7 @@ in
|
||||
}
|
||||
{
|
||||
name = "Steam";
|
||||
cmd = ''${pkgs.bash}/bin/bash -c "${pkgs.gamescope}/bin/gamescope --immediate-flips --rt -C 3000 -f -e -W ''${SUNSHINE_CLIENT_WIDTH} -H ''${SUNSHINE_CLIENT_HEIGHT} -r ''${SUNSHINE_CLIENT_FPS} -- ${pkgs.steam}/bin/steam -pipewire"'';
|
||||
cmd = ''${pkgs.bash}/bin/bash -c "${pkgs.gamescope}/bin/gamescope --adaptive-sync --force-composition --immediate-flips --rt -C 3000 -f -e -W ''${SUNSHINE_CLIENT_WIDTH} -H ''${SUNSHINE_CLIENT_HEIGHT} -r ''${SUNSHINE_CLIENT_FPS} -- ${pkgs.steam}/bin/steam -pipewire"'';
|
||||
prep-cmd = [
|
||||
{
|
||||
do = ''${pkgs.bash}/bin/bash -c "${resolutionScript}/bin/resolution.sh ''${SUNSHINE_CLIENT_WIDTH} ''${SUNSHINE_CLIENT_HEIGHT}" ''${SUNSHINE_CLIENT_FPS}"'';
|
||||
|
Loading…
Reference in New Issue
Block a user