nixpkgs/home/services/languagetool.nix
Daniel Siepmann fdbb403bce
Add systemd service for languagetool
home-manager doesn't provide a systemd service itself.
That's why we build one ourself.

That also revealed a change in our directory structure.
The structure is now documented within readme.
2022-02-02 18:17:06 +01:00

23 lines
511 B
Nix

{ pkgs }:
{
Unit = {
Description = "Languagetool Server";
StartLimitBurst = 3;
StartLimitInterval = 400;
};
Service = {
Restart = "on-failure";
RestartSec = "2s";
# TODO: Make memory optional and configurable
Environment = "JAVA_TOOL_OPTIONS=-Xmx256m";
# TODO: Make port and allow optional and configurable
ExecStart = "${pkgs.languagetool}/bin/languagetool-http-server --port 8081 --allow-origin \"*\"";
};
Install = {
WantedBy = ["default.target"];
};
}