mio-ops/profiles/minecraftServer.nix
2021-11-16 17:53:38 +10:00

30 lines
638 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
];
}