27 lines
743 B
Nix
27 lines
743 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
cfg = config.services.languagetool;
|
|
in
|
|
{
|
|
services.languagetool = {
|
|
enable = true;
|
|
#allowOrigin = "https://languagetool.sbruder.de";
|
|
allowOrigin = "*";
|
|
settings = {
|
|
languageModel = "/var/lib/languagetool/ngrams";
|
|
word2vecModel = "/var/lib/languagetool/word2vec";
|
|
fasttextModel = "/var/lib/languagetool/fasttext/lid.176.bin";
|
|
fasttextBinary = "${pkgs.fasttext}/bin/fasttext";
|
|
};
|
|
};
|
|
|
|
# default log level is INFO, no easy way to reduce it.
|
|
#systemd.services.languagetool.serviceConfig.StandardOutput = "null";
|
|
|
|
services.nginx.virtualHosts."languagetool.sbruder.de" = {
|
|
locations = {
|
|
"/".proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
|
};
|
|
};
|
|
}
|