Standardize Minecraft variable formatting

This commit is contained in:
Bun 2025-03-27 09:24:38 -04:00
parent 9190e09c93
commit 9dbf18228b
12 changed files with 108 additions and 116 deletions

View file

@ -1,18 +1,16 @@
{ config, lib, pkgs, ... }:
let
common = import ../../common { inherit pkgs; };
in {
{
services = {
minecraft-servers.servers.johnside = {
package = pkgs.paperServers.paper-1_21_4;
jvmOpts = "-Xmx2500M";
serverProperties = common.serverProperties // {
serverProperties = config.services.minecraft-servers.common.serverProperties // {
difficulty = 2;
server-port = 30009;
motd = "\\u00A7l\\u00A79Johnside SMP\\u00A7r \\u00A7l\\u00A7fworld for \\u00A74John lovers only.";
};
whitelist = common.whitelist;
symlinks = common.paperSymlinks // {
whitelist = config.services.minecraft-servers.common.whitelist;
symlinks = config.services.minecraft-servers.common.paperSymlinks // {
"plugins/CustomDiscs.jar" = builtins.fetchurl {
url = "https://github.com/Navoei/CustomDiscs/releases/download/v3.0/custom-discs-3.0.jar";
sha256 = "0xv0zrkdmjx0d7l34nqag8j004pm9zqivc12d3zy9pdrkv7pz87d";
@ -26,7 +24,7 @@ in {
sha256 = "0mbp73xclr7f5m2lbdfz6is1j8vvyv1qwpl28sm089zrpm73qn6w";
};
};
files = common.configFiles;
files = config.services.minecraft-servers.common.configFiles;
};
cloudflare-dyndns.domains = lib.mkIf config.services.minecraft-servers.servers.johnside.enable [ "john.nixfox.ca" ];
};