hainich/minecraft: get server.jar via sources.json
This commit is contained in:
parent
3473603f91
commit
df31a3da35
1 changed files with 9 additions and 11 deletions
|
@ -1,21 +1,19 @@
|
|||
{pkgs, lib, config, ...}:
|
||||
|
||||
let
|
||||
sources = import ../../../nix/sources.nix;
|
||||
in
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking.firewall.allowedTCPPorts = [ 25565 ];
|
||||
|
||||
services.minecraft-server = {
|
||||
package = let
|
||||
version = "1.16.5-592";
|
||||
url = "https://papermc.io/api/v2/projects/paper/versions/1.16.5/builds/592/downloads/paper-1.16.5-592.jar";
|
||||
sha256 = "039w44c7png9ppg8w2287mm0aavqdsvg9cdf50p2faa2bs586j9i";
|
||||
in (pkgs.minecraft-server.overrideAttrs (old: rec {
|
||||
name = "minecraft-server-${version}";
|
||||
inherit version;
|
||||
src = pkgs.fetchurl {
|
||||
inherit url sha256;
|
||||
};
|
||||
}));
|
||||
enable = true;
|
||||
package = (pkgs.minecraft-server.overrideAttrs (old: rec {
|
||||
version = "${sources.papermc.rev}-${sources.papermc.version}";
|
||||
name = "papermc-${version}";
|
||||
src = sources.papermc.outPath;
|
||||
}));
|
||||
declarative = true;
|
||||
eula = true;
|
||||
jvmOpts = "-Xmx1536M -Xms512M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -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";
|
||||
|
|
Loading…
Reference in a new issue