Compare commits

..

No commits in common. "a275c8d43e35bdea4e0af6a6351766c7e4da7b62" and "7eeff4c125f9cd9cca2465d4db8540e1965369e2" have entirely different histories.

5 changed files with 43 additions and 6 deletions

View file

@ -53,4 +53,11 @@
}; };
}; };
}; };
# Open ports in the firewall.
# No idea what ports 5201 and 21027 do tho
networking.firewall.allowedTCPPorts = [5201];
networking.firewall.allowedUDPPorts = [5201 21027];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
} }

View file

@ -62,8 +62,4 @@ in {
}; };
}; };
}; };
networking.firewall = {
allowedTCPPorts = [22000];
allowedUDPPorts = [22000 21027];
};
} }

View file

@ -64,8 +64,7 @@ in {
# ages to boot up. If I don't add a delay, caddy tries to bind to # ages to boot up. If I don't add a delay, caddy tries to bind to
# the tailscale interface before it's ready, making it crash too much # the tailscale interface before it's ready, making it crash too much
# in too little time # in too little time
services.caddy.serviceConfig.RestartSec = lib.mkForce "120s"; services.caddy.serviceConfig.RestartSec = lib.mkForce "240s";
services.caddy.unitConfig.StartLimitBurst = lib.mkForce "infinity";
}; };
programs.rust-motd.settings.service_status.Caddy = "caddy"; programs.rust-motd.settings.service_status.Caddy = "caddy";
networking.firewall.allowedTCPPorts = [443 80]; networking.firewall.allowedTCPPorts = [443 80];

View file

@ -14,6 +14,7 @@
./headscale.nix ./headscale.nix
./caddy.nix ./caddy.nix
./rust_motd.nix ./rust_motd.nix
./minecraft.nix
./adguard.nix ./adguard.nix
./changedetection-io.nix ./changedetection-io.nix
]; ];

View file

@ -0,0 +1,34 @@
{
pkgs,
lib,
...
}: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"minecraft-server"
];
users.users.toast.extraGroups = ["minecraft"];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers = {
vrlocals = {
enable = true;
package = pkgs.fabricServers.fabric-1_20_1;
jvmOpts = "-Xmx8G";
serverProperties = {
motd = "\\u00A7aBigChadGuys \\u00A7lPlus \\u00A7a(w/Cobblemon!) v2.8.1\\u00A7r\\n\\u00A76Have fun!";
server-port = 25565;
level-seed = "-1450714289616987871";
white-list = true;
spawn-protection = 0;
enable-command-block = true;
sync-chunk-writes = false;
};
};
};
};
}