l minecraft: use minecraft-server
This commit is contained in:
parent
65a09c22a4
commit
d703e20158
@ -1,19 +1,13 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }: let
|
||||||
|
|
||||||
{
|
unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
|
||||||
users.users = {
|
|
||||||
mc = {
|
in {
|
||||||
name = "mc";
|
services.minecraft-server = {
|
||||||
description = "user playing mc";
|
enable = true;
|
||||||
home = "/home/mc";
|
eula = true;
|
||||||
createHome = true;
|
package = unstable.minecraft-server;
|
||||||
useDefaultShell = true;
|
|
||||||
packages = with pkgs; [
|
|
||||||
tmux
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
krebs.per-user.mc.packages = [ pkgs.jdk ];
|
|
||||||
krebs.iptables.tables.filter.INPUT.rules = [
|
krebs.iptables.tables.filter.INPUT.rules = [
|
||||||
{ predicate = "-p tcp --dport 25565"; target = "ACCEPT"; }
|
{ predicate = "-p tcp --dport 25565"; target = "ACCEPT"; }
|
||||||
{ predicate = "-p udp --dport 25565"; target = "ACCEPT"; }
|
{ predicate = "-p udp --dport 25565"; target = "ACCEPT"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user