diff --git a/hosts/containers/sdrweb/default.nix b/hosts/containers/sdrweb/default.nix index be13f09f..e0992e40 100644 --- a/hosts/containers/sdrweb/default.nix +++ b/hosts/containers/sdrweb/default.nix @@ -1,4 +1,4 @@ -{ hostRegistry, config, ... }: +{ hostRegistry, config, pkgs, ... }: { c3d2 = { isInHq = false; @@ -28,6 +28,26 @@ proxyWebsockets = true; }; }; + virtualHosts."adsb.hq.c3d2.de" = { + forceSSL = true; + enableACME = true; + root = pkgs.runCommandNoCC "adsb-map" {} '' + mkdir $out + cp ${pkgs.fetchurl { + url = "https://github.com/antirez/dump1090/raw/master/gmap.html"; + sha256 = "1llkk1b3n585x7539mszzx6wz91gb0glzafq3813r5wq8s5aywlz"; + }} $out/index.html + substituteInPlace $out/index.html \ + --replace "37.0, 13.0" "51.08102, 13.72806" + ''; + extraConfig = '' + index index.html; + charset utf-8; + ''; + locations."/data.json" = { + proxyPass = "http://${hostRegistry.hosts.radiobert.ip4}:8080/data.json"; + }; + }; }; services.openwebrx.enable = true;