36 lines
1.4 KiB
Nix
36 lines
1.4 KiB
Nix
|
{pkgs, outputs, ...}: let
|
||
|
common = import ../common.nix { inherit pkgs; };
|
||
|
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.";
|
||
|
require-resource-pack = true;
|
||
|
resource-pack = "https://${outputs.secrets.jimDomain}/roguecraftresourcepackredir";
|
||
|
resource-pack-sha1 = "b540c0562aba90c3ead2356bb9cb74fcf0db36b3";
|
||
|
};
|
||
|
whitelist = common.whitelist;
|
||
|
symlinks = common.paperSymlinks;
|
||
|
files = common.configFiles // {
|
||
|
"world/datapacks/roguecraft.zip" = builtins.fetchurl {
|
||
|
url = "https://${outputs.secrets.jimDomain}/roguecraftdatapackredir";
|
||
|
sha256 = "04zrkvzvi1i898al45fh9j3k635sf9qhwca7phbv4ynkfl8bz3q3";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
nginx.virtualHosts."${outputs.secrets.jimDomain}".locations = {
|
||
|
"/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";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|