refactor(minecraft): update to minix and remove unused
All checks were successful
Discord / discord commits (push) Has been skipped

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

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;
};
};
};
};

View file

@ -191,6 +191,22 @@
"type": "github"
}
},
"curseforge-server-downloader-src_2": {
"flake": false,
"locked": {
"lastModified": 1691252534,
"narHash": "sha256-GqFj2Rms6BxzWdQTQ9imXKSlov3sDk8Cwwl9lwjIGzM=",
"owner": "Malpiszonekx4",
"repo": "curseforge-server-downloader",
"rev": "91901b2efc64ac54c9135d537e4118e2ac0bd286",
"type": "github"
},
"original": {
"owner": "Malpiszonekx4",
"repo": "curseforge-server-downloader",
"type": "github"
}
},
"discord-overlay": {
"inputs": {
"Vencord-src": "Vencord-src",
@ -1179,6 +1195,27 @@
"type": "github"
}
},
"minix": {
"inputs": {
"curseforge-server-downloader-src": "curseforge-server-downloader-src_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1720836836,
"narHash": "sha256-2jkzfa6+LfCIJvXxt1gRtYABeoM8OSs4ZCaEQahWzH8=",
"owner": "matt1432",
"repo": "Minix",
"rev": "7537fb893d9485da8313df19db87f710dc4f13ce",
"type": "github"
},
"original": {
"owner": "matt1432",
"repo": "Minix",
"type": "github"
}
},
"modernx-src": {
"flake": false,
"locked": {
@ -1818,26 +1855,6 @@
"type": "sourcehut"
}
},
"nms": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717873515,
"narHash": "sha256-hi8GcyaKkbtD+qMn7n4RxkxHnVScSNyXiuANIbzKdBI=",
"owner": "matt1432",
"repo": "nixos-minecraft-servers",
"rev": "32d1ca998095948790d509d4365ac3e13aa58321",
"type": "github"
},
"original": {
"owner": "matt1432",
"repo": "nixos-minecraft-servers",
"type": "github"
}
},
"nmt": {
"flake": false,
"locked": {
@ -2033,6 +2050,7 @@
"jellyfin-ultrachromic-src": "jellyfin-ultrachromic-src",
"jovian": "jovian",
"libratbag-src": "libratbag-src",
"minix": "minix",
"modernx-src": "modernx-src",
"mozilla-addons-to-nix": "mozilla-addons-to-nix",
"mpv-persist-properties-src": "mpv-persist-properties-src",
@ -2049,7 +2067,6 @@
"nixd": "nixd",
"nixpkgs": "nixpkgs",
"nixpkgs-wayland": "nixpkgs-wayland",
"nms": "nms",
"nurl": "nurl",
"nvim-theme-src": "nvim-theme-src",
"pam-fprint-grosshack-src": "pam-fprint-grosshack-src",

View file

@ -164,6 +164,12 @@
repo = "libratbag";
type = "github";
};
minix = {
inputs.nixpkgs.follows = "nixpkgs";
owner = "matt1432";
repo = "Minix";
type = "github";
};
modernx-src = {
flake = false;
owner = "cyl0";
@ -260,12 +266,6 @@
repo = "nixpkgs-wayland";
type = "github";
};
nms = {
inputs.nixpkgs.follows = "nixpkgs";
owner = "matt1432";
repo = "nixos-minecraft-servers";
type = "github";
};
nurl = {
inputs.nixpkgs.follows = "nixpkgs";
owner = "matt1432";

View file

@ -79,9 +79,9 @@ let
};
serviviInputs = {
nms = mkDep {
minix = mkDep {
owner = "matt1432";
repo = "nixos-minecraft-servers";
repo = "Minix";
};
nix-eval-jobs = mkDep {
@ -208,10 +208,6 @@ let
owner = "phoneybadger";
repo = "pokemon-colorscripts";
}
{
owner = "Malpiszonekx4";
repo = "curseforge-server-downloader";
}
{
name = "gpu-screen-recorder-src";
type = "git";

View file

@ -7,7 +7,6 @@ This directory encompasses every derivations for packages exposed by my flake.
| Name | Source / Description |
| ------------------------------ | -------------------- |
| `coloryou` | A custom package to get the main colors from a picture I forked from [here](https://github.com/dharmx/vile/blob/7d486c128c7e553912673755f97b118aaab0193d/src/shell/playerctl.py#L2) |
| `curseforge-server-downloader` | [Github](https://github.com/Malpiszonekx4/curseforge-server-downloader) |
| `gpu-screen-recorder` | [Git](https://git.dec05eba.com/gpu-screen-recorder/about) |
| `pam-fprint-grosshack` | [GitLab](https://gitlab.com/mishakmak/pam-fprint-grosshack) |
| `pokemon-colorscripts` | [GitLab](https://gitlab.com/phoneybadger/pokemon-colorscripts) |

View file

@ -1,14 +0,0 @@
{
buildGoModule,
curseforge-server-downloader-src,
mkVersion,
...
}:
buildGoModule {
pname = "curseforge-server-downloader";
version = mkVersion curseforge-server-downloader-src;
src = curseforge-server-downloader-src;
doCheck = false;
vendorHash = null;
}

View file

@ -5,11 +5,6 @@
} @ inputs: {
coloryou = pkgs.callPackage ./coloryou {};
curseforge-server-downloader = pkgs.callPackage ./curseforge-server-downloader {
inherit (inputs) curseforge-server-downloader-src;
inherit mkVersion;
};
gpu-screen-recorder = pkgs.callPackage ./gpu-screen-recorder {
inherit (inputs) gpu-screen-recorder-src;
};