minecraft-server: use newer version

This commit is contained in:
Christoph Hollizeck 2025-12-24 17:33:54 +01:00
parent 36ad5fce19
commit 028fab6c1d
3 changed files with 27 additions and 1 deletions

17
flake.lock generated
View file

@ -1457,6 +1457,22 @@
"type": "github"
}
},
"nixpkgs-latest-minecraft": {
"locked": {
"lastModified": 1765340982,
"narHash": "sha256-ScoKn82baWwHH3BwUGUwFO71N3RdKWaEjWwQHT6sesE=",
"owner": "ChandlerSwift",
"repo": "nixpkgs",
"rev": "487be302ead911dc24db3068f6d9631f2db7585d",
"type": "github"
},
"original": {
"owner": "ChandlerSwift",
"repo": "nixpkgs",
"rev": "487be302ead911dc24db3068f6d9631f2db7585d",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1765674936,
@ -1718,6 +1734,7 @@
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3",
"nixpkgs-latest-factorio": "nixpkgs-latest-factorio",
"nixpkgs-latest-minecraft": "nixpkgs-latest-minecraft",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-rpi": "nixpkgs-rpi",
"nixpkgs-unstable": "nixpkgs-unstable",

View file

@ -17,6 +17,7 @@
sops-nix.url = "github:Mic92/sops-nix";
nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/e880129391be2f558d6c205cfd931be338b3b707";
nixpkgs-latest-minecraft.url = "github:ChandlerSwift/nixpkgs/487be302ead911dc24db3068f6d9631f2db7585d";
home-manager = {
url = "github:nix-community/home-manager/master";

View file

@ -1,9 +1,17 @@
{
flake.modules.nixos.minecraft-server =
{ ... }:
{ inputs, pkgs, ... }:
let
latest-minecraft = import inputs.nixpkgs-latest-minecraft {
system = pkgs.stdenv.hostPlatform.system;
config.allowUnfree = true;
};
in
{
services.minecraft-server = {
enable = true;
package = latest-minecraft.minecraft-server;
eula = true;
openFirewall = true; # Opens the port the server is running on (by default 25565 but in this case 43000)
declarative = true;