fuuko/languagetool: Init
This commit is contained in:
parent
fec939d816
commit
e81cbc6539
|
@ -5,10 +5,11 @@
|
|||
../../modules
|
||||
../../users/simon
|
||||
|
||||
./services/co2_exporter.nix
|
||||
./services/languagetool.nix
|
||||
./services/media-backup.nix
|
||||
./services/media.nix
|
||||
./services/torrent.nix
|
||||
./services/co2_exporter.nix
|
||||
];
|
||||
|
||||
sbruder = {
|
||||
|
|
26
machines/fuuko/services/languagetool.nix
Normal file
26
machines/fuuko/services/languagetool.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
'';
|
||||
})
|
||||
[
|
||||
"languagetool.sbruder.de"
|
||||
"media.sbruder.de"
|
||||
"torrent.sbruder.de"
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue