added llama-stack

This commit is contained in:
Bryan Ramos 2026-04-13 23:12:50 -04:00
parent 07586a80ee
commit c41a6ff637
4 changed files with 35 additions and 27 deletions

View file

@ -9,20 +9,18 @@
# Camera RTSP credentials (used by frigate/go2rtc)
sops.secrets = let
cameras = { sopsFile = ../../../secrets/system/cameras.yaml; };
searxng = { sopsFile = ../../../secrets/system/searxng.yaml; };
llama = { sopsFile = ../../../secrets/system/llama.yaml; };
in {
"RTSP_USER" = cameras;
"RTSP_PASS" = cameras;
"SEARXNG_TOKEN" = searxng;
"LLAMA_API_KEY" = llama;
};
sops.templates."nginx-searxng-location.conf" = {
# API key auth for ai.ramos.codes — nginx validates Bearer token against sops secret
sops.templates."nginx-ai-auth.conf" = {
content = ''
location /${config.sops.placeholder."SEARXNG_TOKEN"}/ {
proxy_pass http://192.168.0.23:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
if ($api_key != "${config.sops.placeholder."LLAMA_API_KEY"}") {
return 401 '{"error": "Invalid API key"}';
}
'';
owner = "nginx";
@ -31,7 +29,6 @@
modules.system = {
nginx = {
enable = true;
searxng.enable = true;
};
sandpack.enable = true;
forgejo.enable = true;