diff --git a/applications/acme.nix b/applications/acme.nix index c0b062c..cd04aa5 100644 --- a/applications/acme.nix +++ b/applications/acme.nix @@ -20,7 +20,10 @@ certs = { "skynet" = { domain = "skynet.ie"; - extraDomainNames = ["*.skynet.ie" ]; + extraDomainNames = [ + "*.skynet.ie" + "*.minecraft.games.skynet.ie" + ]; }; diff --git a/applications/games/minecraft.nix b/applications/games/minecraft.nix index ccda1c9..62cad96 100644 --- a/applications/games/minecraft.nix +++ b/applications/games/minecraft.nix @@ -1,4 +1,9 @@ { + imports = [ + ../acme.nix + ../nginx.nix + ]; + skynet_dns.records = { external = []; @@ -6,6 +11,9 @@ # create a sub-subdomain for each game "compsoc_classic.minecraft.games CNAME games" "compsoc.minecraft.games CNAME games" + + "map.compsoc_classic.minecraft.games CNAME games" + #"compsoc.minecraft.games CNAME games" ]; }; @@ -19,6 +27,12 @@ 20001 ]; + services.nginx.virtualHosts."compsoc_classic.minecraft.games.skynet.ie" = { + forceSSL = true; + useACMEHost = "skynet"; + locations."/map/".alias = "/etc/games/minecraft/compsoc/classic/config/plugins/dynmap/web/"; + }; + # arion is one way to use docker on nixos # see https://gitlab.com/c2842/computer_society/nixos/-/blob/733b867f4782afa795848135a83e97a5cafaf16a/applications/games/minecraft.nix # for an example of a single compose file with multiple services