l minecraft: use minecraft-server

This commit is contained in:
lassulus 2020-10-29 08:50:18 +01:00
parent 65a09c22a4
commit d703e20158

View File

@ -1,19 +1,13 @@
{ pkgs, ... }:
{ pkgs, ... }: let
{
users.users = {
mc = {
name = "mc";
description = "user playing mc";
home = "/home/mc";
createHome = true;
useDefaultShell = true;
packages = with pkgs; [
tmux
];
unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
in {
services.minecraft-server = {
enable = true;
eula = true;
package = unstable.minecraft-server;
};
};
krebs.per-user.mc.packages = [ pkgs.jdk ];
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p tcp --dport 25565"; target = "ACCEPT"; }
{ predicate = "-p udp --dport 25565"; target = "ACCEPT"; }