mio-ops/profiles/minecraftServer.nix

33 lines
654 B
Nix
Raw Normal View History

# Minecraft server configuration for NixOS / NixOps
{ config, pkgs, ... }:
{
2021-06-07 12:23:58 +00:00
imports = [ ../secrets/minecraftServer.nix ];
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-06-07 07:25:43 +00:00
enable-command-block = true;
2021-05-25 06:07:37 +00:00
enable-rcon = true;
"rcon.password" = "hunter2";
};
};
2021-05-25 06:07:37 +00:00
environment.systemPackages = with pkgs; [
mcron # Minecraft console client
];
}