mc server
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 2m45s

This commit is contained in:
Satria 2026-05-02 18:41:49 +07:00
commit 2940656cf1
6 changed files with 150 additions and 1 deletions

70
flake.lock generated
View file

@ -18,6 +18,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -76,6 +92,26 @@
"type": "github" "type": "github"
} }
}, },
"mc": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_3",
"systems": "systems_2"
},
"locked": {
"lastModified": 1777692910,
"narHash": "sha256-rPszOFTm7gP9n/JGiFH4SeuEALC8FBJtXu5owvHVjaQ=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "0707737282f65e25ed8e6e73f8767872659b7fb8",
"type": "github"
},
"original": {
"owner": "Infinidoge",
"repo": "nix-minecraft",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1776548001, "lastModified": 1776548001,
@ -108,6 +144,22 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1769461804,
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1777268161, "lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
@ -128,7 +180,8 @@
"ctp": "ctp", "ctp": "ctp",
"gl": "gl", "gl": "gl",
"hm": "hm", "hm": "hm",
"nixpkgs": "nixpkgs_3" "mc": "mc",
"nixpkgs": "nixpkgs_4"
} }
}, },
"systems": { "systems": {
@ -145,6 +198,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -9,6 +9,8 @@
gl.url = "github:nix-community/nixGL"; gl.url = "github:nix-community/nixGL";
ctp.url = "github:catppuccin/nix"; ctp.url = "github:catppuccin/nix";
mc.url = "github:Infinidoge/nix-minecraft";
}; };
outputs = inputs: let outputs = inputs: let

View file

@ -54,9 +54,13 @@ in {
[ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ] [ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ]
]; ];
routes = { routes = {
"mc0.${domain}" = "tcp://localhost:25565";
"docs-sandbox.${domain}" = "http://localhost:7090"; "docs-sandbox.${domain}" = "http://localhost:7090";
"docs.${domain}" = "http://localhost:7090"; "docs.${domain}" = "http://localhost:7090";
"cdn.${domain}" = selfSigned "https://localhost:3923"; "cdn.${domain}" = selfSigned "https://localhost:3923";
"git.${domain}" = "http://localhost:5080"; "git.${domain}" = "http://localhost:5080";
"auth.${domain}" = "http://localhost:1411"; "auth.${domain}" = "http://localhost:1411";
"dash.${domain}" = "http://localhost:5070"; "dash.${domain}" = "http://localhost:5070";

View file

@ -0,0 +1,73 @@
{ inputs, pkgs, ... }: let
ram-allocation = "10240M";
auth-server = "https://mc.satr14.my.id";
# modpack = pkgs.fetchPackwizModpack {
# url = "";
# packHash = "";
# };
in {
imports = [ inputs.mc.nixosModules.minecraft-servers ];
nixpkgs.overlays = [ inputs.mc.overlay ];
services.minecraft-servers = {
enable = true;
eula = true;
servers.mc0-explorers-creativity = {
enable = true;
autoStart = true;
restart = "always";
enableReload = true;
package = pkgs.fabricServers.fabric-26_1.override { loaderVersion = "0.19.2"; };
jvmOpts = let
authlib-injector = pkgs.fetchurl {
url = "https://github.com/yushijinhun/authlib-injector/releases/download/v1.2.7/authlib-injector-1.2.7.jar";
sha256 = "0av58bz0fn7wn9bf7sib62cn4vgkk4mr9mavpn2xiizzmk2lpwga";
};
in ''
-Xms${ram-allocation} -Xmx${ram-allocation} -javaagent:${authlib-injector}=${auth-server}
-add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20
'';
serverProperties = {
server-port = 25565;
server-name = "Digit Association";
motd = "\u00a7lSeason 3\u00a7r - \u00a7dExplorers Creativity \ud83d\udd25";
difficulty = "normal";
gamemode = "survival";
max-world-size = 25000;
spawn-protection = 0;
pvp = true;
online-mode = true;
enforce-secure-profile = false;
pevent-proxy-connections = false;
allow-flight = false;
player-idle-timeout = 0;
# resource-pack = "https://cdn.satr14.my.id/public/fullslide-1.21.11.zip";
# resource-pack-sha1 = "e0958dcef5755286f390c22280700c471ec34a65";
# resource-pack-enforce = false;
simulation-distance = 16;
view-distance = 4;
enable-rcon = true;
sync-chunk-writes = false;
"rcon.password" = "howdy";
"rcon.port" = 25575;
};
symlinks = {
# "resources/datapack/required" = "${modpack}/datapacks";
# "mods" = "${modpack}/mods";
# "server-icon.png" = "${modpack}/server-icon.png";
# "config" = "";
};
};
};
}

View file

@ -74,6 +74,7 @@
lsof lsof
# Nix & Development # Nix & Development
rcon-cli
dconf2nix dconf2nix
home-manager home-manager
nix-index nix-index

View file

@ -25,6 +25,7 @@ in {
./homelab/cdn.nix ./homelab/cdn.nix
./homelab/ai.nix ./homelab/ai.nix
./homelab/db.nix ./homelab/db.nix
./homelab/mc.nix
./core/swapfile.nix ./core/swapfile.nix
./core/oom.nix ./core/oom.nix