From 6b84687f04f18ec8beaac48c03ba53d604ff5269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 15 Sep 2023 22:51:51 +0200 Subject: [PATCH] sdrweb: format --- hosts/sdrweb/default.nix | 115 ++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/hosts/sdrweb/default.nix b/hosts/sdrweb/default.nix index e144b1a3..03ced0b5 100644 --- a/hosts/sdrweb/default.nix +++ b/hosts/sdrweb/default.nix @@ -11,66 +11,69 @@ networking.hostName = "sdrweb"; - services.nginx = { - enable = true; - virtualHosts."sdr.hq.c3d2.de" = { - default = true; - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:8073"; - proxyWebsockets = true; - }; - }; - virtualHosts."adsb.hq.c3d2.de" = { - forceSSL = true; - enableACME = true; - root = pkgs.runCommand "adsb-map" {} '' - mkdir $out - cp ${./adsb.html} $out/index.html - cp ${./jquery-3.7.0.min.js} $out/jquery-3.7.0.min.js - cp ${./airplane.svg} $out/airplane.svg + services = { + collectd.plugins = { + curl_json = '' + + Plugin "openwebrx_decodes" + + Type "counter" + + + Type "counter" + + + Type "counter" + + + Type "counter" + + + Type "gauge" + + + Type "gauge" + + + Type "gauge" + + + Type "gauge" + + ''; - extraConfig = '' - index index.html; - charset utf-8; - ''; - locations."/data.json".proxyPass = "http://${hostRegistry.radiobert.ip4}:8080/data.json"; }; - }; - services.openwebrx.enable = true; + nginx = + { + enable = true; + virtualHosts."sdr.hq.c3d2.de" = { + default = true; + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:8073"; + proxyWebsockets = true; + }; + }; + virtualHosts."adsb.hq.c3d2.de" = { + forceSSL = true; + enableACME = true; + root = pkgs.runCommand "adsb-map" { } '' + mkdir $out + cp ${./adsb.html} $out/index.html + cp ${./jquery-3.7.0.min.js} $out/jquery-3.7.0.min.js + cp ${./airplane.svg} $out/airplane.svg + ''; + extraConfig = '' + index index.html; + charset utf-8; + ''; + locations."/data.json".proxyPass = "http://${hostRegistry.radiobert.ip4}:8080/data.json"; + }; + } - services.collectd.plugins = { - curl_json = '' - - Plugin "openwebrx_decodes" - - Type "counter" - - - Type "counter" - - - Type "counter" - - - Type "counter" - - - Type "gauge" - - - Type "gauge" - - - Type "gauge" - - - Type "gauge" - - - ''; + openwebrx.enable = true; }; services.heliwatch = {