mio-ops/profiles/minecraftServer.nix

30 lines
638 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 ];
2021-11-16 04:57:23 +00:00
nixpkgs = { config = { allowUnfree = true; }; };
services.minecraft-server = {
2021-11-16 04:57:23 +00:00
enable = true; # Enable the Minecraft server.
2021-05-25 06:07:37 +00:00
declarative = true;
2021-11-16 04:57:23 +00:00
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-11-16 04:57:23 +00:00
environment.systemPackages = with pkgs;
[
mcron # Minecraft console client
];
}