stockholm/lass/2configs/minecraft.nix
2020-10-29 08:50:18 +01:00

17 lines
453 B
Nix

{ pkgs, ... }: let
unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
in {
services.minecraft-server = {
enable = true;
eula = true;
package = unstable.minecraft-server;
};
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p tcp --dport 25565"; target = "ACCEPT"; }
{ predicate = "-p udp --dport 25565"; target = "ACCEPT"; }
{ predicate = "-p tcp --dport 8123"; target = "ACCEPT"; }
];
}