mio-ops/profiles/minecraftServer.nix

29 lines
627 B
Nix

# Minecraft server configuration for NixOS / NixOps
{
config,
pkgs,
...
}: {
imports = [../secrets/minecraftServer.nix];
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";
};
};
environment.systemPackages = with pkgs; [
mcron # Minecraft console client
];
}