nixpkgs/home/services/languagetool.nix
Daniel Siepmann a02f8c3341
Make languageserver service configurable
Do not hard code all values, instead configure them within home.nix.

This is more for learning purposes.
But port and allow might also be changed more frequently in general.
2022-02-02 20:38:24 +01:00

21 lines
444 B
Nix

{ pkgs, settings }:
{
Unit = {
Description = "Languagetool Server";
StartLimitBurst = 3;
StartLimitInterval = 400;
};
Service = {
Restart = "on-failure";
RestartSec = "2s";
Environment = "JAVA_TOOL_OPTIONS=-Xmx256m";
ExecStart = "${pkgs.languagetool}/bin/languagetool-http-server --port ${settings.port} --allow-origin ${settings.allow-origin}";
};
Install = {
WantedBy = ["default.target"];
};
}