futile attempt to conf a forge server using nix…

This commit is contained in:
CDaut 2025-10-19 19:18:08 +02:00
parent 9e2b38fbcc
commit 4465bc828b
Signed by: clara
GPG key ID: 223391B52FAD4463
4 changed files with 63 additions and 76 deletions

View file

@ -1,37 +1,24 @@
{ lib, pkgs, config, ... }: {
{ lib, pkgs, config, inputs, ... }: {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"minecraft-server"
];
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
environment.systemPackages = with pkgs; [
rconc
];
services.minecraft-server = {
package = pkgs.papermc;
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true; # Opens the port the server is running on (by default 25565 but in this case 43000)
declarative = true;
whitelist = {
# This is a mapping from Minecraft usernames to UUIDs. You can use https://mcuuid.net/ to get a Minecraft UUID for a username
Scarpiro = "fbbc57a7-189e-4108-916a-7efeed47b197";
LadyRaveena = "a1629c6b-48aa-4b42-8cbf-a7930db39ea2";
tmma = {
enable = true;
package = pkgs.fabricServers.fabric-1_7_10;
};
serverProperties = {
difficulty = 1;
gamemode = 0;
max-players = 2;
motd = "Minecraft UwU :3";
white-list = true;
allow-cheats = true;
pvp = false;
enable-rcon = true;
"rcon.password" = "foobar2342";
"rcon.port" = 25575;
};
jvmOpts = "-Xms2048M -Xmx2048M";
};
networking.firewall.allowedTCPPorts = [ 8080 ];