2024-03-17 11:45:50 +00:00
|
|
|
{config, ...}: {
|
2024-02-09 14:08:42 +00:00
|
|
|
services.minecraft-server = {
|
|
|
|
enable = true;
|
|
|
|
eula = true;
|
2024-03-10 08:07:05 +00:00
|
|
|
openFirewall = true;
|
2024-02-09 14:08:42 +00:00
|
|
|
declarative = true;
|
|
|
|
whitelist = {
|
2024-03-10 08:07:05 +00:00
|
|
|
"pixelifytica" = "b1848d60-4ddd-4fa4-a328-fb269910b6ae";
|
2024-02-11 22:46:06 +00:00
|
|
|
"HomeInTheClouds" = "d49f0aee-f217-477b-9516-9d5906f7fc87";
|
2024-02-09 14:08:42 +00:00
|
|
|
};
|
|
|
|
serverProperties = {
|
2024-03-10 08:07:05 +00:00
|
|
|
server-port = 25565;
|
2024-02-11 22:46:06 +00:00
|
|
|
difficulty = "easy";
|
2024-02-09 14:08:42 +00:00
|
|
|
gamemode = "survival";
|
|
|
|
force-gamemode = true;
|
|
|
|
max-players = 10;
|
|
|
|
# level-seed = 238902389203;
|
|
|
|
motd = "NixOS Minecraft server!";
|
|
|
|
white-list = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-22 14:11:13 +00:00
|
|
|
# Caddy forwarding
|
2024-03-10 08:07:05 +00:00
|
|
|
services.caddy.virtualHosts."craft.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${toString config.services.minecraft-server.serverProperties.server-port}";
|
2024-02-09 14:08:42 +00:00
|
|
|
}
|