diff --git a/ops/nixos/bvm-minecraft/default.nix b/ops/nixos/bvm-minecraft/default.nix new file mode 100644 index 0000000000..5f8723fc40 --- /dev/null +++ b/ops/nixos/bvm-minecraft/default.nix @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ config, depot, pkgs, lib, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../lib/bvm.nix + ]; + + # Networking! + networking = { + hostName = "bvm-minecraft"; + hostId = "c88be606"; + + interfaces.enp1s0 = { + ipv4.addresses = [{ address = "92.118.28.7"; prefixLength = 24; }]; + ipv6.addresses = [{ address = "2a09:a441::7"; prefixLength = 32; }]; + }; + defaultGateway = { address = "92.118.28.1"; interface = "enp1s0"; }; + defaultGateway6 = { address = "2a09:a441::1"; interface = "enp1s0"; }; + + firewall.allowedTCPPorts = [ + 80 443 # HTTP/S + 25565 # Minecraft + ]; + }; + + system.stateVersion = "21.05"; +} diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index af997c5a5e..436fe2f5db 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -39,6 +39,7 @@ let "bvm-prosody" "bvm-ipfs" "bvm-matrix" + "bvm-minecraft" ]; rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; })); systemCfgs = lib.genAttrs systems diff --git a/ops/nixos/installcd/default.nix b/ops/nixos/installcd/default.nix index 0a4e981457..6e9e7d3610 100644 --- a/ops/nixos/installcd/default.nix +++ b/ops/nixos/installcd/default.nix @@ -13,7 +13,7 @@ in { isoImage.isoName = lib.mkForce "nixos-${depot.version}-${pkgs.stdenv.hostPlatform.system}.iso"; isoImage.storeContents = [ - depot.ops.nixos.systems.bvm-matrix + depot.ops.nixos.systems.bvm-minecraft ]; system.stateVersion = "21.05"; diff --git a/ops/nixos/lib/coredns/zones/db.1.4.4.a.9.0.a.2.ip6.arpa b/ops/nixos/lib/coredns/zones/db.1.4.4.a.9.0.a.2.ip6.arpa index 86d98715be..a9f8977289 100644 --- a/ops/nixos/lib/coredns/zones/db.1.4.4.a.9.0.a.2.ip6.arpa +++ b/ops/nixos/lib/coredns/zones/db.1.4.4.a.9.0.a.2.ip6.arpa @@ -3,7 +3,7 @@ ; SPDX-License-Identifier: Apache-2.0 ; MNAME RNAME SERIAL REFRESH RETRY EXPIRE TTL -@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 8 600 450 3600 300 +@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 9 600 450 3600 300 $INCLUDE tmpl.ns @@ -12,6 +12,7 @@ $INCLUDE tmpl.ns 4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR bvm-ipfs.public.as205479.net. 5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR bvm-nixosmgmt.public.as205479.net. 6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR bvm-matrix.public.as205479.net. +7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR bvm-minecraft.public.as205479.net. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR gw.public.as205479.net. e.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR blade-paris.public.as205479.net. f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 3600 IN PTR blade-tuvok.public.as205479.net. diff --git a/ops/nixos/lib/coredns/zones/db.28.118.92.in-addr.arpa b/ops/nixos/lib/coredns/zones/db.28.118.92.in-addr.arpa index 933ceafd55..b10b0bbe9a 100644 --- a/ops/nixos/lib/coredns/zones/db.28.118.92.in-addr.arpa +++ b/ops/nixos/lib/coredns/zones/db.28.118.92.in-addr.arpa @@ -3,7 +3,7 @@ ; SPDX-License-Identifier: Apache-2.0 ; MNAME RNAME SERIAL REFRESH RETRY EXPIRE TTL -@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 8 600 450 3600 300 +@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 9 600 450 3600 300 $INCLUDE tmpl.ns @@ -14,7 +14,7 @@ $INCLUDE tmpl.ns 4 600 IN PTR bvm-ipfs.public.as205479.net. 5 600 IN PTR bvm-nixosmgmt.public.as205479.net. 6 600 IN PTR bvm-matrix.public.as205479.net. -7 600 IN PTR 92-118-28-7.ptr.as205479.net. +7 600 IN PTR bvm-minecraft.public.as205479.net. 8 600 IN PTR 92-118-28-8.ptr.as205479.net. 9 600 IN PTR 92-118-28-9.ptr.as205479.net. 10 600 IN PTR 92-118-28-10.ptr.as205479.net. diff --git a/ops/nixos/lib/coredns/zones/db.as205479.net b/ops/nixos/lib/coredns/zones/db.as205479.net index c04ee9f70c..7195ca0683 100644 --- a/ops/nixos/lib/coredns/zones/db.as205479.net +++ b/ops/nixos/lib/coredns/zones/db.as205479.net @@ -3,7 +3,7 @@ ; SPDX-License-Identifier: Apache-2.0 ; MNAME RNAME SERIAL REFRESH RETRY EXPIRE TTL -@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 20 600 450 3600 300 +@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 21 600 450 3600 300 ; NB: this are also glue records in Google Domains. $INCLUDE tmpl.ns @@ -133,6 +133,8 @@ bvm-nixosmgmt.public 3600 IN A 92.118.28.5 bvm-nixosmgmt.public 3600 IN AAAA 2a09:a441::5 bvm-matrix.public 3600 IN A 92.118.28.6 bvm-matrix.public 3600 IN AAAA 2a09:a441::6 +bvm-minecraft.public 3600 IN A 92.118.28.7 +bvm-minecraft.public 3600 IN AAAA 2a09:a441::7 92-118-28-0.ptr 6000 IN A 92.118.28.0 92-118-28-1.ptr 6000 IN A 92.118.28.1