Simon Bruder
f945341668
This applies the REUSE specification to the repository, so the licensing information can be tracked for every file individually.
31 lines
854 B
Nix
31 lines
854 B
Nix
# SPDX-FileCopyrightText: 2023 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ 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}";
|
|
};
|
|
};
|
|
}
|