NixOS-Config/modules/system/services/server/minecraft/servers/roguecraft/default.nix

37 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, config, ... }:
2024-10-09 03:36:08 -04:00
let
common = import ../../common { inherit pkgs; };
2024-09-25 03:44:06 -04:00
in {
services = {
minecraft-servers.servers.roguecraft = {
enable = true;
package = pkgs.paperServers.paper-1_21_1;
jvmOpts = "-Xmx3000M";
serverProperties = common.serverProperties // {
difficulty = 3;
server-port = 30014;
motd = "\\u00A7l\\u00A7bJimbo's \\u00A7cRoguecraft \\u00A7bserver.";
2024-10-22 08:49:56 -04:00
require-resource-pack = true;
resource-pack = "https://${config.secrets.jimDomain}/roguecraftresourcepackredir";
resource-pack-sha1 = "b540c0562aba90c3ead2356bb9cb74fcf0db36b3";
2024-09-25 03:44:06 -04:00
};
whitelist = common.whitelist;
symlinks = common.paperSymlinks;
files = common.configFiles // {
"world/datapacks/roguecraft.zip" = builtins.fetchurl {
url = "https://${config.secrets.jimDomain}/roguecraftdatapackredir";
2024-09-25 03:44:06 -04:00
sha256 = "04zrkvzvi1i898al45fh9j3k635sf9qhwca7phbv4ynkfl8bz3q3";
};
};
};
nginx.virtualHosts."${config.secrets.jimDomain}".locations = {
2024-09-25 03:44:06 -04:00
"/roguecraftdatapackredir" = {
return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/Rme4c23R/Roguecraft%201.2.6%20-%20Data%20Pack.zip";
};
"/roguecraftresourcepackredir" = {
return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/C6bITJnq/Roguecraft%201.2.5.4%20-%20Resource%20Pack.zip";
};
};
};
}