idk and get rid of sstupid warnings ig

This commit is contained in:
tulg 2026-05-15 01:15:57 +03:00
parent cb6af5e7c4
commit 2960c1fe90
17 changed files with 207 additions and 48 deletions

View file

@ -14,6 +14,12 @@
# 16261 = main game port
# 16262+ = player ports, using 16262-16272 as a sane test range
# 52015 = extra UDP port your server is listening on
minecraftTcpPorts = [
25565
25566
25567
25568
];
zomboidUdpPorts = [
16261
16262
@ -63,9 +69,11 @@ in {
# Public Zomboid UDP ports on kittykat.
allowedUDPPorts = zomboidUdpPorts;
allowedTCPPorts = minecraftTcpPorts;
# Allow tunnel-side packets too.
interfaces.tun0.allowedUDPPorts = zomboidUdpPorts;
interfaces.tun0.allowedTCPPorts = minecraftTcpPorts;
};
networking.nftables = {
@ -79,6 +87,8 @@ in {
# Public players -> kittykat public IP -> overlord over tun0
iifname "${publicInterface}" udp dport 16261-16272 dnat to ${overlordTunIp}
iifname "${publicInterface}" udp dport 52015 dnat to ${overlordTunIp}:52015
# Minecraft TCP
iifname "${publicInterface}" tcp dport 25565-25570 dnat to ${overlordTunIp}
}
chain postrouting {
@ -89,6 +99,7 @@ in {
# so replies go back through the tunnel instead of overlord's normal internet route.
oifname "tun0" ip daddr ${overlordTunIp} udp dport 16261-16272 snat to ${kittykatTunIp}
oifname "tun0" ip daddr ${overlordTunIp} udp dport 52015 snat to ${kittykatTunIp}
oifname "tun0" ip daddr ${overlordTunIp} tcp dport 25565-25570 snat to ${kittykatTunIp}
}
chain forward {
@ -97,6 +108,9 @@ in {
# Public -> tunnel
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} udp dport 16261-16272 accept
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} udp dport 52015 accept
# Minecraft TCP
iifname "${publicInterface}" oifname "tun0" ip daddr ${overlordTunIp} tcp dport 25565-25570 accept
# Tunnel replies -> public
iifname "tun0" oifname "${publicInterface}" ip saddr ${overlordTunIp} accept

View file

@ -5,5 +5,6 @@
./tunnel.nix
./pz.nix
./slopfarms.nix
#./kokoro.nix ts so fucking ass just using elevenlabs atp
];
}

View file

@ -0,0 +1,135 @@
{pkgs, ...}: let
python = pkgs.python312;
spacyModelEn = python.pkgs.buildPythonPackage rec {
pname = "en-core-web-sm";
version = "3.8.0";
format = "wheel";
src = pkgs.fetchurl {
url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-${version}/en_core_web_sm-${version}-py3-none-any.whl";
hash = "sha256-GTJCnbcn1L/z3u1rNM/AXfF3lPSlLusmz4ko98Gg+4U=";
};
propagatedBuildInputs = with python.pkgs; [
spacy
];
doCheck = false;
pythonImportsCheck = ["en_core_web_sm"];
};
espeakngLoaderPkg = python.pkgs.buildPythonPackage rec {
pname = "espeakng-loader";
version = "0.2.4";
format = "wheel";
src = python.pkgs.fetchPypi {
pname = "espeakng_loader";
inherit version;
format = "wheel";
dist = "py3";
python = "py3";
abi = "none";
platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
hash = "sha256-CHIbryfRPUYfa+bu2aZSd+cNaCNP9IT9i5iXsiLNy20=";
};
doCheck = false;
pythonImportsCheck = ["espeakng_loader"];
};
misakiPkg = python.pkgs.buildPythonPackage rec {
pname = "misaki";
version = "0.9.4";
pyproject = true;
src = python.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-OWD6Pm3heakO6OYoRGpKT2uMcwtuNBCZnPOWGJ9NnEA=";
};
nativeBuildInputs = with python.pkgs; [
hatchling
];
propagatedBuildInputs = with python.pkgs; [
spacyModelEn
num2words
addict
numpy
regex
requests
tqdm
spacy
espeakngLoaderPkg
];
doCheck = false;
pythonImportsCheck = ["misaki"];
};
kokoroPkg = python.pkgs.buildPythonPackage rec {
pname = "kokoro";
version = "0.9.4";
pyproject = true;
src = python.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-+/YzJieX+M9G/awzFc+creZ9yLdiwP7M8zSJJ3L7msQ=";
};
nativeBuildInputs = with python.pkgs; [
hatchling
];
propagatedBuildInputs = with python.pkgs; [
torch
numpy
scipy
soundfile
huggingface-hub
loguru
tqdm
regex
requests
transformers
misakiPkg
phonemizer
];
doCheck = false;
pythonImportsCheck = ["kokoro"];
};
slopPython = python.withPackages (ps: [
ps.spacy
ps.num2words
ps.addict
ps.requests
ps.pillow
ps.numpy
ps.soundfile
ps.scipy
ps.tqdm
ps.regex
ps.torch
ps.transformers
ps.huggingface-hub
ps.phonemizer
kokoroPkg
misakiPkg
espeakngLoaderPkg
spacyModelEn
]);
in {
documentation.doc.enable = false;
environment.systemPackages = with pkgs; [
ffmpeg
git
yt-dlp
espeak-ng
slopPython
];
}

View file

@ -8,6 +8,12 @@
overlordTunIp = "10.0.0.1";
kittykatTunIp = "10.0.0.2";
minecraftTcpPorts = [
25565
25566
25567
25568
];
zomboidUdpPorts = [
16261
@ -41,6 +47,7 @@ in {
networking.firewall = {
enable = true;
interfaces.tun0.allowedUDPPorts = zomboidUdpPorts;
interfaces.tun0.allowedTCPPorts = minecraftTcpPorts;
};
systemd.services.ssh-tun-kittykat = {