feat: add nix-minecraft and set-up a fabric server

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2025-12-02 02:47:05 -03:00
parent f709a8a231
commit 6b75769158
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
6 changed files with 132 additions and 2 deletions

90
flake.lock generated
View file

@ -111,6 +111,22 @@
"type": "github"
}
},
"flake-compat_2": {
"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-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@ -129,6 +145,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -499,6 +533,26 @@
"type": "github"
}
},
"nix-minecraft": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1763776632,
"narHash": "sha256-mvumw4Djwi6BgMKVKw5cpNt8a80+h/LvPy2AHOtzBzE=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "e6d3b589d9f1f869e68142f44654e59fcb47390c",
"type": "github"
},
"original": {
"owner": "Infinidoge",
"repo": "nix-minecraft",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1736166416,
@ -572,6 +626,22 @@
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1763835633,
"narHash": "sha256-HzxeGVID5MChuCPESuC0dlQL1/scDKu+MmzoVBJxulM=",
@ -617,7 +687,8 @@
"home-manager": "home-manager",
"hydractify-bot": "hydractify-bot",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_5",
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_6",
"spicetify-nix": "spicetify-nix"
}
},
@ -643,7 +714,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1763985453,
@ -704,6 +775,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"

View file

@ -23,6 +23,8 @@
hydractify-bot.url = "github:hydractify/hydractify-bot";
blink-cmp.url = "github:Saghen/blink.cmp";
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
};
outputs =

View file

@ -53,5 +53,10 @@
header X-Robots-Tag "none"
reverse_proxy 127.0.0.1:7373
'';
virtualHosts."map.thewizard.link".extraConfig = ''
header X-Robots-Tag "none"
reverse_proxy 127.0.0.1:8123
'';
};
}

View file

@ -6,6 +6,7 @@
./caddy.nix
./forgejo.nix
./jellyfin.nix
./minecraft.nix
./nix-serve.nix
./postgresql.nix
];

View file

@ -0,0 +1,35 @@
{ nix-minecraft, pkgs, ... }:
{
imports = [ nix-minecraft.nixosModules.minecraft-servers ];
nixpkgs.overlays = [ nix-minecraft.overlay ];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers.cobblemon = {
enable = true;
package = pkgs.fabricServers.fabric-1_21_1.override { loaderVersion = "0.18.0"; };
openFirewall = true;
autoStart = true;
jvmOpts = "-Xms2048M -Xmx8192M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=4M -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50";
operators = {
WizardLink = {
uuid = "55a58451-8fe9-4dfe-8011-1509e948e7a6";
level = 3;
};
};
serverProperties = {
allow-flight = true;
max-players = 15;
motd = "Welcome to \\u00A7c\\u00A7lHydractify\\u00A7r's \\u00A7bCobblemon\\u00A7r server!";
};
};
};
}

View file

@ -23,6 +23,7 @@
home.packages = with pkgs; [
gamescope
heroic
packwiz
protontricks
r2modman
self.packages.${system}.deadlock-api-ingest