mio-ops/profiles/minecraftServer.nix

29 lines
627 B
Nix
Raw Normal View History

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