36 lines
810 B
Nix
36 lines
810 B
Nix
# Minecraft server configuration for NixOS / NixOps
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
nixpkgs = {
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
|
|
services.minecraft-server = {
|
|
enable = true; # Enable the Minecraft server.
|
|
declarative = true;
|
|
eula = true; # Answer Miecraft's EULA
|
|
openFirewall = true;
|
|
serverProperties = {
|
|
motd = "mcwhirter.io";
|
|
white-list = true;
|
|
enable-command-block = true;
|
|
enable-rcon = true;
|
|
"rcon.password" = "hunter2";
|
|
};
|
|
whitelist = {
|
|
hamish12345 = "cb280dd7-14af-4f5b-9855-7051c98e6860";
|
|
TongMaster = "765bbc7c-6a06-4f10-8bde-f15a8a779007";
|
|
STWXander = "0a6dd5d3-25e8-4fc6-a601-2a1a6838e22a";
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
mcron # Minecraft console client
|
|
];
|
|
}
|