nixos-config/config/services/minecraft.nix

261 lines
6.6 KiB
Nix
Raw Normal View History

2023-02-16 07:26:41 +00:00
{
pkgs,
config,
...
}: {
2022-02-19 14:34:26 +00:00
imports = [
2022-02-20 15:30:04 +00:00
../../modules/minecraft/server.nix
../../modules/minecraft/luckperms.nix
2022-02-20 20:47:57 +00:00
../../modules/minecraft/essentialsx.nix
2022-02-24 09:00:53 +00:00
../../modules/minecraft/multiverse.nix
2022-02-19 14:34:26 +00:00
];
services.minecraft = {
enable = true;
2023-04-17 15:43:39 +00:00
stateDir = "/persist/var/lib/minecraft";
2022-02-19 14:37:50 +00:00
whitelist = [
{
2022-04-01 17:11:18 +00:00
uuid = "74e2502d-64db-4ac4-bac7-a0a2bc50ec9f";
name = "DragonKing1337";
2022-02-19 14:37:50 +00:00
}
{
uuid = "a6578f9a-288d-44af-8f43-e6402b126bb6";
name = "DarkKirb";
}
2022-02-21 11:24:28 +00:00
{
uuid = "5c29f08d-bc6f-4e3f-a83f-9454c5543d49";
name = "Hrothiwulfus";
}
2023-06-16 16:22:41 +00:00
{
uuid = "6253c244-cdf6-41b9-9187-62ad7552ca5c";
name = "BL4CKM1ND";
}
2023-06-18 06:23:53 +00:00
{
uuid = "7ee66be7-c8a7-44c9-8f2b-8dae22afbf09";
name = "blackmind";
}
2023-09-02 12:53:21 +00:00
{
uuid = "64315aa6-b996-4e9a-95d0-c6b567c2a2e6";
name = "_KleineMio_";
}
{
uuid = "7df86b33-1987-4b99-8290-d23440c13bc2";
name = "DaTsHeePiii";
}
2023-12-28 19:31:20 +00:00
{
name = "crafted2cc";
uuid = "894a8cfe-4066-4a68-be7d-2b01a62a1ed6";
}
2024-01-23 19:20:22 +00:00
{
name = "blackghost4";
uuid = "4a8b0dbb-7239-4b5b-8a59-e5d6ce728299";
}
2022-02-19 14:37:50 +00:00
];
2023-04-17 16:52:55 +00:00
properties.server-ip = "172.16.154.251"; # death
2022-02-20 11:25:35 +00:00
paper-yml = {
world-settings.default = {
max-auto-save-chunks-per-tick = 8;
optimize-explosions = true;
mob-spawner-tick-rate = 2;
game-mechanics.disable-chest-cat-detection = true;
container-update-tick-rate = 3;
max-entity-collisions = 2;
grass-spread-tick-rate = 4;
non-player-arrow-despawn-rate = 60;
creative-arrow-despawn-rate = 60;
despawn-ranges = rec {
monster = {
soft = 28;
hard = 96;
};
creature = monster;
ambient = monster;
axolotls = monster;
underground_water_creature = monster;
water_creature = monster;
water_ambient = {
soft = 28;
hard = 32;
};
misc = monster;
};
hopper = {
disable-move-event = true;
};
prevent-moving-into-unloaded-chunks = true;
use-faster-eigencraft-redstone = true;
armor-stands-tick = false;
per-player-mob-spawns = true;
};
};
2022-02-20 15:30:04 +00:00
luckperms = {
enable = true;
2022-02-20 16:29:44 +00:00
config = {
enable-ops = false;
};
2022-02-20 17:19:39 +00:00
groups = {
admin = {
name = "admin";
permissions = [
"*"
2022-02-21 10:48:18 +00:00
{
"essentials.hat.prevent-type.*" = {
value = false;
};
}
2022-02-24 09:38:01 +00:00
{
"mv.bypass.gamemode.*" = {
value = false;
};
}
2022-02-20 17:19:39 +00:00
];
prefixes = [
{
"&d@" = {
2022-02-21 08:39:09 +00:00
priority = 1;
2022-02-20 17:19:39 +00:00
};
}
];
};
2022-02-21 10:48:18 +00:00
default = {
name = "default";
permissions = [
"bukkit.command.help"
"bukkit.commit.mspt"
"bukkit.command.plugins"
"bukkit.command.version"
"essentials.balance"
"essentials.book"
"essentials.compass"
"essentials.delhome"
"essentials.depth"
"essentials.editsign"
"essentials.gc"
"essentials.getpos"
"essentials.help"
"essentials.helpop"
"essentials.ignore"
"essentials.info"
"essentials.itemdb"
"essentials.itemlore"
"essentials.keepinv"
"essentials.keepxp"
"essentials.list"
"essentials.mail"
"essentials.me"
"essentials.motd"
"essentials.msgtoggle"
"essentials.pay"
"essentials.payconfirmtoggle"
"essentials.paytoggle"
"essentials.ping"
"essentials.playtime"
"essentials.realname"
"essentials.recipe"
"essentials.rtoggle"
"essentials.rules"
2022-02-24 09:45:50 +00:00
{
"essentials.sell" = {
value = true;
context = {
gamemode = "survival";
};
};
}
"essentials.sell.hand"
2022-02-21 10:48:18 +00:00
"essentials.skull"
"essentials.sleepingignored"
"essentials.tpa"
"essentials.tpacancel"
"essentials.tpaccept"
"essentials.tpahere"
"essentials.tpauto"
"essentials.tpdeny"
"essentials.warp"
"essentials.warpinfo"
"essentials.world"
"essentials.whois"
"essentials.worth"
"essentials.afk"
"essentials.afk.auto"
"essentials.balancetop"
"essentials.hat"
"essentials.home"
"essentials.near"
"essentials.nick"
"essentials.seen"
"essentials.seen.extra"
"essentials.sethome"
"essentials.sethome.bed"
2022-02-24 09:38:01 +00:00
"multiverse.access.*"
2022-02-21 10:48:18 +00:00
];
};
2022-02-20 17:19:39 +00:00
};
2022-02-20 17:52:23 +00:00
users = {
a6578f9a-288d-44af-8f43-e6402b126bb6 = {
uuid = "a6578f9a-288d-44af-8f43-e6402b126bb6";
name = "DarkKirb";
2022-02-20 19:14:35 +00:00
primary-group = "admin";
2022-02-20 17:59:24 +00:00
parents = [
2022-02-20 17:52:23 +00:00
"admin"
"default"
];
};
};
2022-02-20 15:30:04 +00:00
};
2022-02-20 20:47:57 +00:00
essentialsx = {
enable = true;
2022-02-21 08:39:09 +00:00
config = {
change-playerlist = true;
change-tab-complete-name = true;
add-prefix-in-playerlist = true;
add-suffix-in-playerlist = true;
respawn-at-home = true;
currency-symbol = "";
currency-symbol-suffix = true;
2022-02-21 10:48:18 +00:00
chat.format = "{DISPLAYNAME}&r: {MESSAGE}";
enabled-signs = [
"color"
"balance"
"buy"
"sell"
"trade"
"free"
"disposal"
"warp"
"mail"
];
2022-02-21 08:39:09 +00:00
};
worth-yml = ../../extra/worth.yml;
2022-02-20 20:47:57 +00:00
};
2022-02-24 09:00:53 +00:00
multiverse = {
enable = true;
2022-02-24 09:16:48 +00:00
netherportals = true;
signportals = true;
inventories = true;
2022-02-24 09:00:53 +00:00
};
2022-02-19 14:34:26 +00:00
};
2022-02-20 17:19:39 +00:00
networking.firewall.allowedTCPPorts = [
config.services.minecraft.properties.server-port
];
2023-02-16 14:53:41 +00:00
services.minecraft.plugins = [
{
package = (pkgs.callPackage ../../packages/minecraft/dynmap.nix {}).core;
startScript = "";
}
];
services.caddy.virtualHosts."mc.chir.rs" = {
2023-02-16 15:12:58 +00:00
useACMEHost = "chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
2023-04-17 16:52:55 +00:00
reverse_proxy http://172.16.154.251:8123 {
trusted_proxies private_ranges
}
'';
};
2022-02-19 14:34:26 +00:00
}