2023-05-12 22:05:10 +01:00
|
|
|
{ lib, config, pkgs, ... }:
|
2021-08-23 19:00:19 +01:00
|
|
|
|
2022-11-10 09:59:09 +00:00
|
|
|
let
|
2022-02-15 11:02:12 +00:00
|
|
|
domain = "minecraft.giugl.io";
|
2023-05-12 22:05:10 +01:00
|
|
|
|
|
|
|
utilities = import ./utilities.nix { inherit lib config; };
|
|
|
|
inherit (utilities) architectInterfaceAddress;
|
2022-11-10 09:59:09 +00:00
|
|
|
in
|
|
|
|
{
|
2023-02-14 23:19:52 +00:00
|
|
|
architect.firewall.openTCP = [ 25565 ];
|
|
|
|
|
2021-08-23 19:02:45 +01:00
|
|
|
services.minecraft-server = {
|
2021-08-23 19:00:19 +01:00
|
|
|
enable = true;
|
|
|
|
eula = true;
|
2021-08-23 19:02:45 +01:00
|
|
|
declarative = true;
|
2023-02-14 20:30:37 +00:00
|
|
|
package = pkgs.unstablePkgs.minecraft-server;
|
2021-11-25 11:42:32 +00:00
|
|
|
serverProperties = { motd = "Welcome on the RuNas server!"; };
|
2021-08-23 19:00:19 +01:00
|
|
|
};
|
2023-05-12 22:05:10 +01:00
|
|
|
|
2021-08-23 19:00:19 +01:00
|
|
|
networking.extraHosts = ''
|
2023-05-12 22:05:10 +01:00
|
|
|
${architectInterfaceAddress "lan"} ${domain}
|
|
|
|
${architectInterfaceAddress "tailscale"} ${domain}
|
2021-11-25 11:42:32 +00:00
|
|
|
'';
|
2021-08-23 19:00:19 +01:00
|
|
|
}
|