straylight: persist Tailscale HTTPS for llama-server

OpenCode talks to https://straylight.scylla-hammerhead.ts.net/v1, which is
Tailscale Serve on :443 proxying localhost:11434. Re-apply the serve
config on a timer so  cannot leave the API dark.
This commit is contained in:
2026-09-16 13:18:09 -07:00
parent 1e94e6638e
commit 62e57955eb
+24
View File
@@ -200,6 +200,30 @@ in
}; };
}; };
# TLS for the llama.cpp API over the tailnet. Clients using
# https://straylight.scylla-hammerhead.ts.net/v1 hit Tailscale Serve on
# :443, which proxies to llama-server on localhost:11434. A boot oneshot
# is not enough: `tailscale serve reset` clears the config without
# stopping this unit, so a timer re-applies it.
systemd.services.tailscale-serve-llama = {
description = "Tailscale HTTPS proxy for llama-server";
after = [ "tailscaled.service" "llama-server.service" ];
wants = [ "tailscaled.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.tailscale}/bin/tailscale serve --bg --https=443 http://127.0.0.1:11434";
};
};
systemd.timers.tailscale-serve-llama = {
description = "Re-apply Tailscale HTTPS proxy for llama-server";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "15s";
OnUnitActiveSec = "1min";
Unit = "tailscale-serve-llama.service";
};
};
# Local ASR: OpenAI-compatible /v1/audio/transcriptions on 11435. # Local ASR: OpenAI-compatible /v1/audio/transcriptions on 11435.
# CPU-only so it does not contend with llama-server for GTT. # CPU-only so it does not contend with llama-server for GTT.
users.users.whisper-server = { users.users.whisper-server = {