29 lines
691 B
Nix
29 lines
691 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
systemd.services.velocity = {
|
|
description = "Minecraft Velocity Proxy";
|
|
after = [
|
|
"network-online.target"
|
|
"limbo.service"
|
|
];
|
|
wants = [ "network-online.target" ];
|
|
requires = [ "limbo.service" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
User = "imnyang";
|
|
Group = "users";
|
|
WorkingDirectory = "/home/imnyang/minecraft/proxy";
|
|
ExecStart = "${pkgs.corretto25}/bin/java -jar /home/imnyang/minecraft/proxy/velocity.jar";
|
|
Restart = "always";
|
|
RestartSec = 5;
|
|
SuccessExitStatus = [ 0 143 ];
|
|
};
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
25565
|
|
];
|
|
}
|