services.papermc.enable

Whether to enable PaperMC service.

Type: boolean

Default: false

Example: true

Declared by:

services.papermc.package

The papermc package to use.

Type: package

Default: pkgs.papermc

Declared by:

services.papermc.dataDir

Directory to store Minecraft database and other state/data files.

Type: path

Default: "/var/lib/papermc"

Declared by:

services.papermc.eula

Whether you agree to Mojangs EULA. This option must be set to true to run Minecraft server.

Type: boolean

Default: false

Declared by:

services.papermc.extraPreStart

Extra shell commands for service pre-start hook.

Type: strings concatenated with “\n”

Default: ""

Declared by:

services.papermc.jvmOpts

JVM options for the Minecraft server.

Type: strings concatenated with " "

Default: "-Xmx2048M -Xms2048M"

Example: "-Xms4092M -Xmx4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"

Declared by:

services.papermc.openFirewall

Whether to open ports in the firewall for the server.

Type: boolean

Default: false

Declared by:

services.papermc.ops

Whitelist with players / operators.

Type: list of (attribute set)

Default: [ ]

Declared by:

services.papermc.rconPasswordFile

Path to file with rcon password.

Type: null or string

Default: null

Example: "/var/lib/secrets/papermc/rconpw"

Declared by:

services.papermc.serverProperties

Minecraft server properties for the server.properties file. See https://minecraft.gamepedia.com/Server.properties#Java_Edition_3 for documentation on these values.

Type: attribute set of (boolean or signed integer or string)

Default:

{
  "rcon.password" = {
    _type = "if";
    condition = false;
    content = "#rconpass#";
  };
}

Example:

{
    server-port = 43000;
    difficulty = 3;
    gamemode = 1;
    max-players = 5;
    motd = "NixOS Minecraft server!";
    white-list = true;
    enable-rcon = true;
    "rcon.password" = "hunter2";
}

Declared by:

services.papermc.whitelist

This is a mapping from Minecraft usernames to UUIDs.

Type: list of (attribute set)

Default: { }

Declared by: