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.
23 lines
511 B
Nix
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"];
|
|
};
|
|
}
|