From 6197225e11bc0e664ee6e2a71329cec834aa3511 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sun, 29 Sep 2024 12:00:00 +0200 Subject: minecraft-server: init --- systems/system1/configuration.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'systems/system1') diff --git a/systems/system1/configuration.nix b/systems/system1/configuration.nix index 5695eb9..b33edbe 100644 --- a/systems/system1/configuration.nix +++ b/systems/system1/configuration.nix @@ -104,6 +104,23 @@ # enable agame server { services.agame.enable = true; + systemd.services.agame.wantedBy = pkgs.lib.mkForce [ ]; + } + # enable minecraft server + { + services.minecraft-server.enable = true; + services.minecraft-server.eula = true; + services.minecraft-server.openFirewall = true; + services.minecraft-server.declarative = true; + services.minecraft-server.package = (import (import ../../nix/sources.nix).nixpkgs_latest { + config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "minecraft-server" ]; + }).pkgs.minecraft-server; + + services.minecraft-server.serverProperties.difficulty = 3; + services.minecraft-server.serverProperties.motd = config.services.minecraft-server.package.version; + + services.minecraft-server.whitelist.Alsbach = "9e479252-1c7d-45dc-a6ba-5fb8b659af86"; + services.minecraft-server.whitelist.elbueblo = "3d0afb8e-3289-4b18-90c6-e113eb636e5b"; } ]; } -- cgit v1.2.3