From 863abf5a10abf5a95512ff56b308edee93deb139 Mon Sep 17 00:00:00 2001 From: imnyang Date: Sat, 25 Jul 2026 07:31:19 +0900 Subject: [PATCH] wow --- hosts/server/natsu/default.nix | 1 + hosts/server/natsu/services/velocity.nix | 29 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 hosts/server/natsu/services/velocity.nix diff --git a/hosts/server/natsu/default.nix b/hosts/server/natsu/default.nix index 1b29d32..aeee863 100644 --- a/hosts/server/natsu/default.nix +++ b/hosts/server/natsu/default.nix @@ -14,6 +14,7 @@ nixpkgs.lib.nixosSystem { ./services/forgejo-runner.nix ./services/limbo.nix ./services/stream.nix + ./services/velocity.nix # ./services/harmonia.nix ./configuration.nix ./hardware-configuration.nix diff --git a/hosts/server/natsu/services/velocity.nix b/hosts/server/natsu/services/velocity.nix new file mode 100644 index 0000000..b04506f --- /dev/null +++ b/hosts/server/natsu/services/velocity.nix @@ -0,0 +1,29 @@ +{ 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 + ]; +}