nix-flakes/hosts/server/natsu/services/velocity.nix
2026-07-25 11:24:25 +09:00

28 lines
671 B
Nix

{ pkgs, ... }:
{
systemd.services.velocity = {
description = "Minecraft Velocity Proxy";
after = [
"network-online.target"
];
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
];
}