1
0
Fork 0

Services: fix a bunch of stuff with LT

This commit is contained in:
Aires 2024-09-28 17:15:39 -04:00
parent e2cb177353
commit dc8a4c700a
2 changed files with 5 additions and 4 deletions

View file

@ -28,6 +28,7 @@ let
forgejo.url forgejo.url
gremlin-lab.url gremlin-lab.url
jellyfin.url jellyfin.url
languagetool.url
netdata.url netdata.url
qbittorrent.url qbittorrent.url
]; ];
@ -161,7 +162,7 @@ in
languagetool = { languagetool = {
enable = true; enable = true;
url = config.secrets.services.languagetool.url; url = config.secrets.services.languagetool.url;
port = 8090; port = 8100;
auth.user = config.secrets.services.languagetool.auth.user; auth.user = config.secrets.services.languagetool.auth.user;
auth.password = config.secrets.services.languagetool.auth.password; auth.password = config.secrets.services.languagetool.auth.password;
ngrams.enable = true; ngrams.enable = true;

View file

@ -46,13 +46,13 @@ in
services = { services = {
languagetool = lib.mkIf cfg.enable { languagetool = lib.mkIf cfg.enable {
enable = true; enable = true;
port = 8090; port = cfg.port;
public = true; public = true;
allowOrigin = "*"; allowOrigin = "*";
# Enable Ngrams # Enable Ngrams
settings.languageModel = lib.mkIf cfg.ngrams.enable "${ settings.languageModel = lib.mkIf cfg.ngrams.enable "${
(pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; }) (pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; })
}/ngrams"; }/share/languagetool/ngrams";
}; };
# Create Nginx virtualhost # Create Nginx virtualhost
nginx.virtualHosts."${cfg.url}" = { nginx.virtualHosts."${cfg.url}" = {
@ -62,7 +62,7 @@ in
"${cfg.auth.user}" = cfg.auth.password; "${cfg.auth.user}" = cfg.auth.password;
}; };
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:8090"; proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}";
extraConfig = "proxy_ssl_server_name on;"; extraConfig = "proxy_ssl_server_name on;";
}; };
}; };