From ac38af598eff77d6809f1add48c1d8e4ca758a66 Mon Sep 17 00:00:00 2001 From: Roy Dumblauskas Date: Sat, 21 Jun 2025 11:54:12 -0500 Subject: [PATCH] add minecraft config --- nixos/configuration.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 3a7ec8c..6f5cada 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -92,6 +92,32 @@ }; }; + # ================================ # + # MINECRAFT # + # ================================ # + services.minecraft-server = { + enable = true; + eula = true; + openFirewall = true; # Opens the port the server is running on (by default 25565 but in this case 43000) + declarative = true; + dataDir = "/persist/var/lib/minecraft"; + + serverProperties = { + server-port = 43000; + difficulty = 3; + gamemode = 1; + max-players = 10; + motd = "NixOS Minecraft server!"; + allow-cheats = true; + }; + jvmOpts = "-Xms4092M -Xmx4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"; + }; + + # ================================ # + # END MINECRAFT # + # ================================ # + + # Grub Boot Loader Setup boot.loader = { efi = {