aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/apps.nix4
-rw-r--r--nixos/games/minecraft.nix12
2 files changed, 14 insertions, 2 deletions
diff --git a/nixos/apps.nix b/nixos/apps.nix
index b8f6e9b..9918029 100644
--- a/nixos/apps.nix
+++ b/nixos/apps.nix
@@ -37,6 +37,6 @@
];
};
- networking.firewall.allowedTCPPorts = [ 53317 8081 4173 3001 ];
- networking.firewall.allowedUDPPorts = [ 53317 8081 4173 3001 ];
+ networking.firewall.allowedTCPPorts = [ 53317 41567 ];
+ networking.firewall.allowedUDPPorts = [ 53317 41567 ];
}
diff --git a/nixos/games/minecraft.nix b/nixos/games/minecraft.nix
index 594f8bd..6507764 100644
--- a/nixos/games/minecraft.nix
+++ b/nixos/games/minecraft.nix
@@ -3,4 +3,16 @@
environment.systemPackages = with pkgs; [
prismlauncher
];
+
+ # you do need to enable all of the ports because minecraft LAN uses a fucking
+ # random one
+ networking.firewall = {
+ enable = true;
+ allowedTCPPortRanges = [
+ { from = 1024; to = 65535; }
+ ];
+ allowedUDPPortRanges = [
+ { from = 1024; to = 65535; }
+ ];
+ };
}