mio-ops/profiles/minecraftServer.nix

35 lines
775 B
Nix
Raw Normal View History

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