fuuko/languagetool: Init

This commit is contained in:
Simon Bruder 2023-03-01 15:12:17 +01:00
parent fec939d816
commit e81cbc6539
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 29 additions and 1 deletions

View file

@ -5,10 +5,11 @@
../../modules ../../modules
../../users/simon ../../users/simon
./services/co2_exporter.nix
./services/languagetool.nix
./services/media-backup.nix ./services/media-backup.nix
./services/media.nix ./services/media.nix
./services/torrent.nix ./services/torrent.nix
./services/co2_exporter.nix
]; ];
sbruder = { sbruder = {

View file

@ -0,0 +1,26 @@
{ 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}";
};
};
}

View file

@ -12,6 +12,7 @@
''; '';
}) })
[ [
"languagetool.sbruder.de"
"media.sbruder.de" "media.sbruder.de"
"torrent.sbruder.de" "torrent.sbruder.de"
]); ]);