nixos/hosts/architect/minecraft.nix

25 lines
588 B
Nix
Raw Permalink Normal View History

{ lib, config, pkgs, ... }:
2021-08-23 19:00:19 +01:00
2022-11-10 09:59:09 +00:00
let
domain = "minecraft.giugl.io";
utilities = import ./utilities.nix { inherit lib config; };
inherit (utilities) architectInterfaceAddress;
2022-11-10 09:59:09 +00:00
in
{
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;
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
};
2021-08-23 19:00:19 +01:00
networking.extraHosts = ''
${architectInterfaceAddress "lan"} ${domain}
${architectInterfaceAddress "tailscale"} ${domain}
2021-11-25 11:42:32 +00:00
'';
2021-08-23 19:00:19 +01:00
}