NixOS-Configuration/hosts/nixserver/minecraft.nix

30 lines
612 B
Nix
Raw Normal View History

2024-01-13 21:16:41 +00:00
{ pkgs, services, ... }:
2024-01-10 23:07:25 +00:00
2024-01-13 21:16:41 +00:00
let
common_dir = ../../common;
forge = pkgs.callPackage (common_dir + /custom-packages/forge-installer/forge.nix) {};
2024-01-10 23:07:25 +00:00
in {
services.minecraft-server = {
enable = true;
eula = true;
package = forge;
jvmOpts = "-Xms8G -Xmx24G";
declarative = true;
serverProperties = {
difficulty = "hard";
gamemode = "survival";
level-name = "vh";
motd = "Let's vault!";
view-distance = 12;
enable-rcon = true;
"rcon.password" = "d3u@@bdvVuVq9fgL#r10iFbJA";
spawn-protection = 0;
};
openFirewall = true;
};
}