forked from poz/niksos
minecraft server that almost burned my cpu so it's off for now
This commit is contained in:
parent
6e9109316c
commit
b912ddfa7a
2 changed files with 44 additions and 0 deletions
|
@ -5,6 +5,7 @@ _: {
|
||||||
./grafana.nix
|
./grafana.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./i2pd.nix
|
./i2pd.nix
|
||||||
|
#./minecraft
|
||||||
#./wireguard.nix
|
#./wireguard.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
43
hosts/chmura/minecraft/default.nix
Normal file
43
hosts/chmura/minecraft/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.minecraft-server = {
|
||||||
|
enable = false;
|
||||||
|
package = pkgs.purpur;
|
||||||
|
eula = true;
|
||||||
|
declarative = true;
|
||||||
|
jvmOpts = "";
|
||||||
|
serverProperties = {
|
||||||
|
server-ip = "192.168.15.17";
|
||||||
|
server-port = 2137;
|
||||||
|
difficulty = 3;
|
||||||
|
gamemode = 0;
|
||||||
|
enable-command-block = false;
|
||||||
|
hide-online-players = true;
|
||||||
|
level-name = "swiat";
|
||||||
|
max-players = 2;
|
||||||
|
online-mode = true;
|
||||||
|
snooper-enabled = false;
|
||||||
|
spawn-protection = 0;
|
||||||
|
view-distance = 12;
|
||||||
|
white-list = true;
|
||||||
|
enforce-whitelist = true;
|
||||||
|
};
|
||||||
|
whitelist = {
|
||||||
|
jacekpoz = "8cc45dd9-0145-4068-be30-038a3844ebd0";
|
||||||
|
krizej = "c456cd5a-489d-4c6e-9613-aa9735fe2843";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."mc.jacekpoz.pl".extraConfig = ''
|
||||||
|
reverse_proxy * localhost:2137
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 2137 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 2137 ];
|
||||||
|
}
|
Loading…
Reference in a new issue