33 lines
654 B
Nix
33 lines
654 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
|
|
];
|
|
}
|