refactor(minecraft): update to minix and remove unused

This commit is contained in:
matt1432 2024-07-12 22:16:00 -04:00
parent cc57e70de5
commit 8af4a53238
8 changed files with 54 additions and 159 deletions
devices/servivi/modules

View file

@ -4,6 +4,8 @@
in {
systemd.extraConfig = "DefaultLimitNOFILE=10240";
# TODO: make backups
# https://github.com/Krutonium/NewNix/blob/455aafc4caf553248ca228f844f021cecf494dc2/services/sevendaystodie.nix#L6
systemd.services."7-days-to-die" = {
wantedBy = ["multi-user.target"];

View file

@ -1,33 +1,28 @@
{
config,
nms,
minix,
pkgs,
self,
...
}: let
inherit (config.vars) mainUser;
in {
imports = [nms.nixosModules.default];
imports = [minix.nixosModules.default];
environment.systemPackages = [
self.packages.${pkgs.system}.curseforge-server-downloader
minix.packages.${pkgs.system}.curseforge-server-downloader
];
systemd.services.mc-steampunk.path = with pkgs; [curl];
services = {
borgbackup.configs.mc = {
paths = ["/var/lib/minecraft"];
paths = ["/var/lib/minix"];
startAt = "01/3:00";
};
modded-minecraft-servers = {
minix = {
eula = true;
user = mainUser;
instances = let
jre17 = pkgs.temurin-bin-17;
jre18 = pkgs.temurin-bin-18;
jre21 = pkgs.temurin-bin-21;
defaults = {
@ -43,7 +38,6 @@ in {
jvmMaxAllocation = "10G";
jvmInitialAllocation = "2G";
jvmPackage = jre21;
jvmOpts = "";
serverConfig =
{
@ -53,6 +47,7 @@ in {
extra-options = {
difficulty = "hard";
enable-command-block = true;
enforce-white-list = true;
max-players = 10;
view-distance = 16;
level-seed = "8764718009920";
@ -68,7 +63,6 @@ in {
jvmMaxAllocation = "8G";
jvmInitialAllocation = "2G";
jvmPackage = jre21;
jvmOpts = "";
serverConfig =
{
@ -86,100 +80,6 @@ in {
}
// defaults;
};
# Modded https://www.curseforge.com/minecraft/modpacks/steam-punk
# curseforge-server-downloader --pack 643605 --version latest
steampunk = {
enable = false;
jvmMaxAllocation = "12G";
jvmInitialAllocation = "2G";
jvmPackage = jre18;
jvmOpts = "";
serverConfig =
{
server-port = 25569;
motd = "";
extra-options = {
allow-nether = true;
enable-command-block = true;
enable-status = true;
entity-broadcast-range-percentage = 100;
force-gamemode = false;
function-permission-level = 2;
gamemode = "survival";
generate-structures = true;
max-build-height = 256;
max-players = 8;
difficulty = "normal";
view-distance = 12;
simulation-distance = 10;
sync-chunk-writes = true;
use-native-transport = true;
};
}
// defaults;
};
# Modded https://www.curseforge.com/minecraft/modpacks/ultimate-building-modpack
# With https://www.curseforge.com/minecraft/mc-mods/bits-and-chisels
builder = {
enable = false;
jvmMaxAllocation = "6G";
jvmInitialAllocation = "2G";
jvmPackage = jre18;
jvmOpts = "";
serverConfig =
{
server-port = 25567;
motd = "creative mode gaming with mods";
extra-options = {
generate-structures = false;
level-type = "minecraft:flat";
difficulty = "hard";
enable-command-block = true;
enforce-white-list = false;
gamemode = "creative";
max-players = 6;
view-distance = 16;
};
}
// defaults;
};
# Vault Hunters
vh = {
enable = false;
jvmMaxAllocation = "12G";
jvmInitialAllocation = "2G";
jvmPackage = jre17;
jvmOpts = "";
serverConfig =
{
server-port = 25569;
motd = "we do a little hunting of the vaults";
extra-options = {
difficulty = "hard";
enable-command-block = true;
entity-broadcast-range-percentage = 150;
level-type = "default";
max-players = 8;
spawn-protection = 0;
sync-chunk-writes = true;
use-native-transport = true;
view-distance = 10;
};
}
// defaults;
};
};
};
};