summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-10-29 08:50:18 +0100
committerlassulus <lassulus@lassul.us>2020-10-29 08:50:18 +0100
commitd703e20158ad80e71641255b9fb247092f3ba28e (patch)
tree31b8bf25e7aee323fa24e91ace990b05f7951671
parent65a09c22a4666bb772af4d67da71b3c4b0886da7 (diff)
l minecraft: use minecraft-server
-rw-r--r--lass/2configs/minecraft.nix22
1 files changed, 8 insertions, 14 deletions
diff --git a/lass/2configs/minecraft.nix b/lass/2configs/minecraft.nix
index 6f8ceb358..d2a3672c5 100644
--- a/lass/2configs/minecraft.nix
+++ b/lass/2configs/minecraft.nix
@@ -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"; }