From 291a3347e9baedd35baf855e58dc98caef066d69 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Jan 2018 00:02:38 +0100 Subject: l: add minecraft.nix --- lass/1systems/prism/config.nix | 8 +------- lass/2configs/minecraft.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 lass/2configs/minecraft.nix (limited to 'lass') diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 03e9f6eeb..3e42ecd75 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -289,13 +289,6 @@ in { alias /var/realwallpaper/realwallpaper.png; ''; } - { - services.minecraft-server.enable = true; - krebs.iptables.tables.filter.INPUT.rules = [ - { predicate = "-p tcp --dport 25565"; target = "ACCEPT"; } - { predicate = "-p udp --dport 25565"; target = "ACCEPT"; } - ]; - } { @@ -318,6 +311,7 @@ in { RandomizedDelaySec = "2min"; }; } + ]; krebs.build.host = config.krebs.hosts.prism; diff --git a/lass/2configs/minecraft.nix b/lass/2configs/minecraft.nix new file mode 100644 index 000000000..aa33dcccc --- /dev/null +++ b/lass/2configs/minecraft.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + users.users = { + mc = { + name = "mc"; + description = "user playing mc"; + home = "/home/mc"; + createHome = true; + useDefaultShell = true; + packages = with pkgs; [ + tmux + ]; + }; + }; + 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"; } + ]; +} -- cgit v1.2.3