cobblemon public
This commit is contained in:
parent
5e8cb90b83
commit
ff604fa02d
2 changed files with 23 additions and 15 deletions
|
|
@ -123,17 +123,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.streamConfig = ''
|
|
||||||
server {
|
|
||||||
listen 25565 reuseport;
|
|
||||||
proxy_pass 10.100.0.2:25565;
|
|
||||||
}
|
|
||||||
server {
|
|
||||||
listen 25566 reuseport;
|
|
||||||
proxy_pass 10.100.0.2:25566;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -158,10 +147,6 @@ in
|
||||||
usePredictableInterfaceNames = false;
|
usePredictableInterfaceNames = false;
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [
|
|
||||||
25565 # minecraft survival
|
|
||||||
25566 # minecraft creative
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
51820 # wireguard
|
51820 # wireguard
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -108,5 +108,28 @@ in
|
||||||
cobblemonPort
|
cobblemonPort
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(lib.mkIf (config.networking.hostName == "loadedskypotato") {
|
||||||
|
services.nginx.streamConfig = ''
|
||||||
|
server {
|
||||||
|
listen ${survivalPort} reuseport;
|
||||||
|
proxy_pass 10.100.0.2:${survivalPort};
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen ${creativePort} reuseport;
|
||||||
|
proxy_pass 10.100.0.2:${creativePort};
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen ${cobblemonPort} reuseport;
|
||||||
|
proxy_pass 10.100.0.2:${cobblemonPort};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
survivalPort
|
||||||
|
creativePort
|
||||||
|
cobblemonPort
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue