librechat: add jwt tokens
All checks were successful
Build hosts / build-hosts (pull_request) Successful in 19s
Flake check / flake-check (pull_request) Successful in 20s

This commit is contained in:
sid 2026-05-19 19:43:48 +02:00
parent f97186cefc
commit d038353260
2 changed files with 15 additions and 3 deletions

View file

@ -6,7 +6,6 @@
}:
let
inherit (constants) domain;
inherit (constants.hosts.rx4) ip;
inherit (constants.services.librechat-oci) fqdn port;
in
@ -19,6 +18,7 @@ in
enable = true;
inherit port;
externalUrl = "https://${fqdn}";
environmentFile = config.sops.templates.librechat-env-file.path;
};
services.nginx.virtualHosts."${fqdn}" = {
@ -41,4 +41,13 @@ in
postRun = "systemctl restart podman-librechat.service";
group = "nginx";
};
sops = {
secrets."librechat/jwt-token" = { }; # openssl rand -hex 32
secrets."librechat/jwt-refresh-token" = { }; # openssl rand -hex 32
templates.librechat-env-file.content = ''
JET_TOKEN=${config.sops.placeholder."librechat/jwt-token"}
JET_REFRESH_TOKEN=${config.sops.placeholder."librechat/jwt-refresh-token"}
'';
};
}