2023-12-26 17:10:10 -05:00
|
|
|
{
|
|
|
|
config,
|
2024-07-12 22:16:00 -04:00
|
|
|
minix,
|
2023-12-26 17:10:10 -05:00
|
|
|
pkgs,
|
|
|
|
...
|
2024-01-09 13:13:04 -05:00
|
|
|
}: let
|
|
|
|
inherit (config.vars) mainUser;
|
|
|
|
in {
|
2024-07-12 22:16:00 -04:00
|
|
|
imports = [minix.nixosModules.default];
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2024-01-30 21:04:11 -05:00
|
|
|
environment.systemPackages = [
|
2024-07-12 22:16:00 -04:00
|
|
|
minix.packages.${pkgs.system}.curseforge-server-downloader
|
2024-01-30 21:04:11 -05:00
|
|
|
];
|
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
services = {
|
2024-01-04 03:39:14 -05:00
|
|
|
borgbackup.configs.mc = {
|
2024-07-12 22:16:00 -04:00
|
|
|
paths = ["/var/lib/minix"];
|
2024-02-19 10:29:07 -05:00
|
|
|
startAt = "01/3:00";
|
2024-01-04 03:39:14 -05:00
|
|
|
};
|
|
|
|
|
2024-07-12 22:16:00 -04:00
|
|
|
minix = {
|
2023-12-27 00:33:19 -05:00
|
|
|
eula = true;
|
2024-01-09 13:13:04 -05:00
|
|
|
user = mainUser;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
instances = let
|
2024-06-23 15:51:15 -04:00
|
|
|
jre21 = pkgs.temurin-bin-21;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
defaults = {
|
|
|
|
spawn-protection = 0;
|
|
|
|
max-tick-time = 5 * 60 * 1000;
|
|
|
|
allow-flight = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# Vanilla Survival
|
|
|
|
sv = {
|
2024-04-09 15:46:18 -04:00
|
|
|
enable = true;
|
|
|
|
|
|
|
|
jvmMaxAllocation = "10G";
|
|
|
|
jvmInitialAllocation = "2G";
|
2024-06-23 15:51:15 -04:00
|
|
|
jvmPackage = jre21;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25569;
|
2024-06-23 15:51:15 -04:00
|
|
|
motd = "1.21 gaming";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
2024-04-09 15:46:18 -04:00
|
|
|
difficulty = "hard";
|
|
|
|
enable-command-block = true;
|
2024-07-12 22:16:00 -04:00
|
|
|
enforce-white-list = true;
|
2024-04-09 15:46:18 -04:00
|
|
|
max-players = 10;
|
|
|
|
view-distance = 16;
|
|
|
|
level-seed = "8764718009920";
|
2023-12-27 00:33:19 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
# Vanilla Creative
|
|
|
|
cv = {
|
2024-04-14 00:17:01 -04:00
|
|
|
enable = true;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2024-04-14 00:17:01 -04:00
|
|
|
jvmMaxAllocation = "8G";
|
2023-12-27 00:33:19 -05:00
|
|
|
jvmInitialAllocation = "2G";
|
2024-06-23 16:57:20 -04:00
|
|
|
jvmPackage = jre21;
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
serverConfig =
|
|
|
|
{
|
|
|
|
server-port = 25566;
|
|
|
|
motd = "creative mode gaming";
|
2023-12-26 17:10:10 -05:00
|
|
|
|
2023-12-27 00:33:19 -05:00
|
|
|
extra-options = {
|
|
|
|
difficulty = "hard";
|
|
|
|
enable-command-block = true;
|
2024-02-18 17:51:17 -05:00
|
|
|
enforce-white-list = true;
|
2023-12-27 00:33:19 -05:00
|
|
|
gamemode = "creative";
|
|
|
|
max-players = 6;
|
|
|
|
view-distance = 16;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// defaults;
|
|
|
|
};
|
2023-12-26 17:10:10 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|