forked from nico/dots
minecraft: init
This commit is contained in:
parent
63e37750a8
commit
ceeec17202
6 changed files with 269 additions and 9 deletions
29
modules/games/server/minecraft/building.nix
Normal file
29
modules/games/server/minecraft/building.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.minecraft-servers.servers.building = {
|
||||
enable = true;
|
||||
package = pkgs.paperServers.paper-1_21_5;
|
||||
autoStart = true;
|
||||
jvmOpts = "-Xms4096M -Xmx4096M";
|
||||
|
||||
serverProperties = {
|
||||
server-port = 30002;
|
||||
difficulty = 3;
|
||||
max-players = 30;
|
||||
online-mode = false;
|
||||
gamemode = "creative";
|
||||
};
|
||||
|
||||
symlinks = {
|
||||
"plugins/Worldedit.jar" = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/1u6JkXh5/versions/NhJaettg/worldedit-bukkit-7.3.12-beta-01.jar"; sha256 = "sha256-NP5ALYQe6DVVAeTeDGxySKZ8sjQnLjQc8PTbDS+Lbd4="; };
|
||||
"plugins/EssentialsX.jar" = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/hXiIvTyT/versions/SKQwLLoQ/EssentialsX-2.21.0.jar"; sha256 = "sha256-VwQyKlSDa5hLEQ9+Igi67RiGwu/tREa0l+Z+US/skMU="; };
|
||||
};
|
||||
};
|
||||
|
||||
services.minecraft-servers.servers.velocity.symlinks."velocity.toml".value = {
|
||||
servers = {
|
||||
building = "127.0.0.1:30002";
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/games/server/minecraft/default.nix
Normal file
15
modules/games/server/minecraft/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./velocity.nix
|
||||
./fabric-modless.nix
|
||||
./building.nix
|
||||
];
|
||||
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
dataDir = "/var/lib/minecraft";
|
||||
};
|
||||
}
|
||||
37
modules/games/server/minecraft/fabric-modless.nix
Normal file
37
modules/games/server/minecraft/fabric-modless.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.minecraft-servers.servers.fabric-modless = {
|
||||
enable = true;
|
||||
package = pkgs.fabricServers.fabric-1_21_5;
|
||||
autoStart = true;
|
||||
jvmOpts = "-Xms4096M -Xmx4096M";
|
||||
|
||||
serverProperties = {
|
||||
server-port = 30001;
|
||||
difficulty = 3;
|
||||
max-players = 30;
|
||||
};
|
||||
|
||||
symlinks = {
|
||||
mods = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues {
|
||||
FabricAPI = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/FZ4q3wQK/fabric-api-0.119.9%2B1.21.5.jar"; sha512 = "4eec629514cba71e4792c1ebf357e574713e5fdb3c01c6e7d132ed631bdeaab0b38bcab84d4ade14c6966c24f9938026da2e65c25b58cde4ce9710c49d147e87"; };
|
||||
Chunky = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/fALzjamp/versions/mhLtMoLk/Chunky-Fabric-1.4.36.jar"; sha512 = "65a201c246c95f6189a16e715d944e4a7ca7f44a8c4a39c8e6523d8c58e331d6611c78deff050cb4a2a2d80c5b8d84e3593a9b8ff961f7aee3d171a4ef7af2c7"; };
|
||||
Ferritecore = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/uXXizFIs/versions/CtMpt7Jr/ferritecore-8.0.0-fabric.jar"; sha512 = "131b82d1d366f0966435bfcb38c362d604d68ecf30c106d31a6261bfc868ca3a82425bb3faebaa2e5ea17d8eed5c92843810eb2df4790f2f8b1e6c1bdc9b7745"; };
|
||||
NoChatReports = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/qQyHxfxd/versions/CHlHxkvf/NoChatReports-FABRIC-1.21.5-v2.12.0.jar"; sha512 = "c0825db25672cf8b50face51ec8a6bedb4be50b374a2537640a433c98817bc07c177485e93ab8cee9e3f7bfb1d2eb1460309e818b411764c92426b552487a9f7"; };
|
||||
FabricProxyLite = pkgs.fetchurl { url = "https://cdn.modrinth.com/data/8dI2tmqs/versions/AQhF7kvw/FabricProxy-Lite-2.9.0.jar"; sha512 = "3044f36df7e83021210a7c318def18a95b5dbf5e3230bb72a3ddb42ebdda33f248c6d12efcee1240ff0c54600d68d147afa105d04ee37a90acb9409619c89848"; };
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
services.minecraft-servers.servers.velocity.symlinks."velocity.toml".value = {
|
||||
servers = {
|
||||
fabric-modless = "127.0.0.1:30001";
|
||||
|
||||
# In what order we should try servers when a player logs in or is kicked from a server.
|
||||
try = [
|
||||
"fabric-modless"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
89
modules/games/server/minecraft/velocity.nix
Normal file
89
modules/games/server/minecraft/velocity.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.minecraft-servers.servers.velocity = {
|
||||
enable = true;
|
||||
package = pkgs.velocityServers.velocity;
|
||||
autoStart = true;
|
||||
openFirewall = true;
|
||||
jvmOpts = "-Xms256M -Xmx1024M";
|
||||
symlinks = {
|
||||
"plugins/Luckperms.jar" = pkgs.fetchurl { url = "https://download.luckperms.net/1575/velocity/LuckPerms-Velocity-5.4.158.jar"; sha512 = "07b649db2d2c9f16791d706621dcb606d05bbc1125fa65765e7d4cf4b45778a84f65ca4ad8e461ff146646805072852322cfbd91d66699af5e895d00b233648f"; };
|
||||
"plugins/Velocitab.jar" = pkgs.fetchurl { url = "https://hangarcdn.papermc.io/plugins/William278/Velocitab/versions/1.7.5/VELOCITY/Velocitab-1.7.5.jar"; sha512 = "ExyxRVbkzgVRTOZC9yRrwJbNpRnD1aFZa/QlMmBHAjLMXYmM/Q7lRMGtQs3dyrjBI06Z9e01ZaOmTTa2RbtNew=="; };
|
||||
|
||||
"plugins/Message.jar" = pkgs.fetchurl { url = "https://hangarcdn.papermc.io/plugins/OskarsMC-Plugins/message/versions/1.4.0/VELOCITY/message-1.4.0-all.jar"; sha512 = "62503339714d7d26d71a98b2036cd04e91c9049567a033441d904a5f3190177bdc41dcd5183e6c51eb083a143edbfaf50642d44c99c1b83e7a3546a3654305c8"; };
|
||||
"plugins/Send.jar" = pkgs.fetchurl { url = "https://github.com/OskarsMC-Plugins/send/releases/download/3.0.0/send-3.0.0.jar"; sha512 = "aff03bb13804cd01ecd649d283bfdb0b3411cb4df045670328a43f53a05f7386a76a536c4fcbbd3cdc718aa300f2ab2940c7437a181e31fa9f1c9c0e591896ab"; };
|
||||
"plugins/Broadcast.jar" = pkgs.fetchurl { url = "https://github.com/OskarsMC-Plugins/broadcast/releases/download/1.0.0/broadcast-1.0.0.jar"; sha512 = "80911709bb8889a3a338d8430b6305d7a3530ff63640a59edf196344f53aca6a1830a57b38a54e01a31f09758e8d89f6fce65af87f63cd6c3d83a5e5d028f544"; };
|
||||
};
|
||||
|
||||
symlinks."velocity.toml".value = {
|
||||
# Config version. Do not change this
|
||||
config-version = "2.7";
|
||||
|
||||
bind = "0.0.0.0:25565";
|
||||
motd = "<#09add3>A Velocity Server";
|
||||
show-max-players = 500; # displayed maximum players, not an actual cap
|
||||
online-mode = true;
|
||||
force-key-authentication = true;
|
||||
player-info-forwarding-mode = "modern";
|
||||
forwarding-secret-file = "forwarding.secret";
|
||||
announce-forge = false; # lets clients know server supports forge mods
|
||||
kick-existing-players = false; # kick when multiple connections are made from the same account
|
||||
ping-passthrough = "DISABLED";
|
||||
|
||||
forced-hosts = {
|
||||
};
|
||||
};
|
||||
|
||||
files."plugins/velocitab/tab_groups.yml".value = {
|
||||
groups = [
|
||||
{
|
||||
name = "default";
|
||||
headers = [ "<gray>" ];
|
||||
footers = [ "<gray>connected to <light_purple>%server%<gray>" ];
|
||||
format = "<white>%prefix%%username% <gray>%server%";
|
||||
nametag.prefix = "%prefix%";
|
||||
nametag.suffix = "";
|
||||
sorting_placeholders = [
|
||||
"%role_weight%"
|
||||
"%username_lower%"
|
||||
];
|
||||
only_list_players_in_same_server = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
files."plugins/message/config.toml".value = {
|
||||
plugin = {
|
||||
enabled = true;
|
||||
luckperms-integration = true; # If luckperms is found, use luckperms prefixes and suffixes.
|
||||
miniplaceholders-integration = true; # If miniplaceholders is present, you can use the MiniPlaceholders placeholders in the messages.
|
||||
allow-self-message-sending = true; # Allow a player to send messages to themselves.
|
||||
};
|
||||
|
||||
messages = {
|
||||
message-sent = "<light_purple>✉</light_purple> <gray><sender></gray> <dark_gray>→</dark_gray> <gray><receiver></gray> <white><message></white>";
|
||||
message-received = "<light_purple>✉</light_purple> <gray><receiver></gray> <dark_gray>→</dark_gray> <gray><sender></gray> <white><message></white>";
|
||||
message-socialspy = "<light_purple>✉ spy</light_purple> <gray><sender></gray> <dark_gray>→</dark_gray> <gray><receiver></gray> <white><message></white>";
|
||||
};
|
||||
|
||||
aliases = {
|
||||
message = ["msg" "tell"];
|
||||
reply = ["r"];
|
||||
};
|
||||
|
||||
error-handlers = { };
|
||||
developer-info.config-version = 1.2;
|
||||
};
|
||||
files."plugins/send/config.toml".value = {
|
||||
plugin.enabled = true;
|
||||
servers.server-blacklist = false;
|
||||
developer-info.config-version = 0.2;
|
||||
|
||||
messages = {
|
||||
send-success-plural="<gray>Sent <light_purple><players></light_purple> players to <light_purple><server></light_purple>.";
|
||||
send-success-singular="<gray>Sent <light_purple><player></light_purple> to <light_purple><server></light_purple>.";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue