feat(libretranslate): install
This commit is contained in:
parent
de21c82acb
commit
d4118655df
2 changed files with 21 additions and 0 deletions
20
modules/nixos/features/libretranslate.nix
Normal file
20
modules/nixos/features/libretranslate.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
let
|
||||
port = 5023;
|
||||
certloc = "/var/lib/acme/fi33.buzz";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
libretranslate = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
updateModels = true;
|
||||
};
|
||||
|
||||
caddy.virtualHosts."translate.fi33.buzz".extraConfig = ''
|
||||
reverse_proxy localhost:${toString port}
|
||||
tls ${certloc}/cert.pem ${certloc}/key.pem {
|
||||
protocols tls1.3
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue