Update minecraft sevver to 1.21
Fetch pinned version of nixpkgs-unstable to get newer papermcServer versions Remove bedrock.xenia.me.uk since it doesn't actually handle the port redirection anyway...
This commit is contained in:
parent
8cd9bb0399
commit
3dc4432406
|
@ -3,9 +3,20 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
# Fetch papermc v1.21 from unstable branch of nixpkgs
|
||||||
|
(final: prev: let
|
||||||
|
pinnedPkgs = import (builtins.fetchTarball {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/archive/03a94c776f261b78b95de0971a94dea0199b4cd8.tar.gz";
|
||||||
|
sha256 = "0vngf4g468qd5fqch85nzyvn7bpa6p2i6rdmzc6ws2653x868w3g";
|
||||||
|
}) {inherit (pkgs) system;};
|
||||||
|
in {
|
||||||
|
inherit (pinnedPkgs) papermc papermcServers;
|
||||||
|
})
|
||||||
|
];
|
||||||
services.minecraft-server = {
|
services.minecraft-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.papermcServers.papermc-1_20_4;
|
package = pkgs.papermcServers.papermc-1_21;
|
||||||
eula = true;
|
eula = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
declarative = true;
|
declarative = true;
|
||||||
|
@ -27,8 +38,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Caddy forwarding
|
# Caddy forwarding
|
||||||
services.caddy.virtualHosts = {
|
services.caddy.virtualHosts."craft.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${toString config.services.minecraft-server.serverProperties.server-port}";
|
||||||
"craft.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${toString config.services.minecraft-server.serverProperties.server-port}";
|
|
||||||
"bedrock.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:19132";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue