From 9ac730a8afb151bd0f685dddb229d9a9c5a37b26 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 13 Oct 2021 22:53:27 +0200 Subject: [PATCH] sdrweb: add adsb.hq.c3d2.de --- hosts/containers/sdrweb/default.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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;