commit 552046dc6b558412471c7f8d4da722772bdeb65d
parent e4b9da894d7a01b24353117f1bdd343a8e88894d
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 21 Oct 2022 17:21:09 +0200
parent e4b9da894d7a01b24353117f1bdd343a8e88894d
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 21 Oct 2022 17:21:09 +0200
machines/lollo/websites: move wifionic.de here
4 files changed, 70 insertions(+), 70 deletions(-)
A
|
69
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D
|
69
---------------------------------------------------------------------
diff --git a/machines/lollo/websites/default.nix b/machines/lollo/websites/default.nix @@ -8,6 +8,7 @@ ./storage.home.ctu.cx ./flauschehorn.sexy.nix + ./wifionic.de.nix ]; }
diff --git a/machines/lollo/websites/wifionic.de.nix b/machines/lollo/websites/wifionic.de.nix @@ -0,0 +1,69 @@ +{ pkgs, ...}: + +let + version = "251"; + +in { + + dns.zones."wifionic.de" = (pkgs.dns.lib.combinators.host "195.39.246.41" "2a0f:4ac0:acab::1"); + + systemd = { + services.check-o2tiles = { + onFailure = [ "email-notify@%i.service" ]; + startAt = "*-*-* 3:00:00"; + after = [ "network-online.target" ]; + path = [ pkgs.curl ]; + script = '' + curl --fail "https://dccb7552-tiles.spatialbuzz.net/tiles/o2_de-v${version}/styles/o2_de_v${version}_4g/15/17303/10472.png" 1> /dev/null; + ''; + serviceConfig = { + Type = "oneshot"; + + DynamicUser = true; + + NoNewPrivileges = true; + PrivateTmp = true; + PrivateDevices = true; + + RestrictAddressFamilies = "AF_INET AF_INET6"; + RestrictNamespaces = true; + RestrictRealtime = true; + + ProtectSystem = "full"; + ProtectControlGroups = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + + DevicePolicy = "closed"; + LockPersonality = true; + }; + }; + }; + + + services.nginx = { + enable = true; + virtualHosts."wifionic.de" = { + enableACME = true; + forceSSL = true; + locations = { + "/".root = pkgs.mobile-coverage-map; + + "/vodafone-map" = { + proxyPass = "https://netmap.vodafone.de/arcgis/rest/services/CoKart/netzabdeckung_mobilfunk_4x"; + extraConfig = "proxy_set_header Accept-Encoding '';"; + }; + + "/magenta-at-map" = { + proxyPass = "https://app.wigeogis.com/kunden/tmobile/data/geoserver.php"; + extraConfig = '' + proxy_set_header Accept-Encoding ""; + proxy_set_header Host "app.wigeogis.com"; + ''; + }; + + }; + }; + }; + +}
diff --git a/machines/osterei/websites/default.nix b/machines/osterei/websites/default.nix @@ -8,7 +8,6 @@ ./oeffi.ctu.cx.nix ./oeffisear.ch.nix ./photos.ctu.cx.nix - ./wifionic.de.nix ]; }
diff --git a/machines/osterei/websites/wifionic.de.nix b/machines/osterei/websites/wifionic.de.nix @@ -1,69 +0,0 @@ -{ pkgs, ...}: - -let - version = "251"; - -in { - - dns.zones."wifionic.de" = (pkgs.dns.lib.combinators.host "185.232.70.80" "2a03:4000:4e:af1::1"); - - systemd = { - services.check-o2tiles = { - onFailure = [ "email-notify@%i.service" ]; - startAt = "*-*-* 3:00:00"; - after = [ "network-online.target" ]; - path = [ pkgs.curl ]; - script = '' - curl --fail "https://dccb7552-tiles.spatialbuzz.net/tiles/o2_de-v${version}/styles/o2_de_v${version}_4g/15/17303/10472.png" 1> /dev/null; - ''; - serviceConfig = { - Type = "oneshot"; - - DynamicUser = true; - - NoNewPrivileges = true; - PrivateTmp = true; - PrivateDevices = true; - - RestrictAddressFamilies = "AF_INET AF_INET6"; - RestrictNamespaces = true; - RestrictRealtime = true; - - ProtectSystem = "full"; - ProtectControlGroups = true; - ProtectKernelModules = true; - ProtectKernelTunables = true; - - DevicePolicy = "closed"; - LockPersonality = true; - }; - }; - }; - - - services.nginx = { - enable = true; - virtualHosts."wifionic.de" = { - enableACME = true; - forceSSL = true; - locations = { - "/".root = pkgs.mobile-coverage-map; - - "/vodafone-map" = { - proxyPass = "https://netmap.vodafone.de/arcgis/rest/services/CoKart/netzabdeckung_mobilfunk_4x"; - extraConfig = "proxy_set_header Accept-Encoding '';"; - }; - - "/magenta-at-map" = { - proxyPass = "https://app.wigeogis.com/kunden/tmobile/data/geoserver.php"; - extraConfig = '' - proxy_set_header Accept-Encoding ""; - proxy_set_header Host "app.wigeogis.com"; - ''; - }; - - }; - }; - }; - -}