Services: fix a bunch of stuff with LT
This commit is contained in:
parent
e2cb177353
commit
dc8a4c700a
|
@ -28,6 +28,7 @@ let
|
|||
forgejo.url
|
||||
gremlin-lab.url
|
||||
jellyfin.url
|
||||
languagetool.url
|
||||
netdata.url
|
||||
qbittorrent.url
|
||||
];
|
||||
|
@ -161,7 +162,7 @@ in
|
|||
languagetool = {
|
||||
enable = true;
|
||||
url = config.secrets.services.languagetool.url;
|
||||
port = 8090;
|
||||
port = 8100;
|
||||
auth.user = config.secrets.services.languagetool.auth.user;
|
||||
auth.password = config.secrets.services.languagetool.auth.password;
|
||||
ngrams.enable = true;
|
||||
|
|
|
@ -46,13 +46,13 @@ in
|
|||
services = {
|
||||
languagetool = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
port = 8090;
|
||||
port = cfg.port;
|
||||
public = true;
|
||||
allowOrigin = "*";
|
||||
# Enable Ngrams
|
||||
settings.languageModel = lib.mkIf cfg.ngrams.enable "${
|
||||
(pkgs.callPackage ../../packages/languagetool-ngrams.nix { inherit pkgs lib; })
|
||||
}/ngrams";
|
||||
}/share/languagetool/ngrams";
|
||||
};
|
||||
# Create Nginx virtualhost
|
||||
nginx.virtualHosts."${cfg.url}" = {
|
||||
|
@ -62,7 +62,7 @@ in
|
|||
"${cfg.auth.user}" = cfg.auth.password;
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8090";
|
||||
proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}";
|
||||
extraConfig = "proxy_ssl_server_name on;";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue