{ pkgs, config, inputs, ... } : let # Keys that can access the state of each instance (read/write!) over an rsync module # Leave empty to disable rsyncSSHKeys = config.users.users.defin.openssh.authorizedKeys.keys; jre17 = pkgs.temurin-bin-17; defaults = { # 5 minutes tick timeout, for heavy packs max-tick-time = 5 * 60 * 1000; # It just ain't modded minecraft without flying around allow-flight = true; }; in { # minecraft server is closed source nixpkgs.config.allowUnfree = true; imports = [ inputs.mms.module ]; services.modded-minecraft-servers = { # This is mandatory for legal reasons. eula = true; # the name will be used for the state folder and system user. # in this case, the folder is '/var/lib/mc-deceasedcraft' # and the user is 'mc-deceasedcraft' deceasedcraft = { enable = true; inherit rsyncSSHKeys; jvmMaxAllocation = "8G"; jvmInitialAllocation = "2G"; jvmPackage = jre17; # I believe these options match services.minecraft-server.serverProperties options serverConfig = defaults // { # Port must be unique server-port = 25565; rcon-port = 25566; gamemode = "survival"; motd = "Welcome to DeceasedCraft"; max-players = 10; }; }; }; }