2022-01-16 13:26:37 +01:00
|
|
|
{ zentralwerk, config, pkgs, ... }:
|
2021-10-07 23:00:50 +02:00
|
|
|
{
|
2021-10-13 21:44:04 +02:00
|
|
|
c3d2 = {
|
|
|
|
isInHq = false;
|
|
|
|
hq.statistics.enable = true;
|
|
|
|
};
|
|
|
|
|
2021-10-07 23:00:50 +02:00
|
|
|
networking.hostName = "sdrweb";
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
networking.interfaces.eth0.ipv4.addresses = [{
|
2022-01-16 13:26:37 +01:00
|
|
|
address = config.c3d2.hosts."${config.networking.hostName}".ip4;
|
2021-11-20 01:03:57 +01:00
|
|
|
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
|
2021-10-07 23:00:50 +02:00
|
|
|
}];
|
|
|
|
networking.defaultGateway = "172.20.73.1";
|
|
|
|
|
|
|
|
# http https
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2021-10-19 01:26:48 +02:00
|
|
|
|
2021-10-07 23:00:50 +02:00
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts."sdr.hq.c3d2.de" = {
|
|
|
|
default = true;
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:8073";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2021-10-13 22:53:27 +02:00
|
|
|
virtualHosts."adsb.hq.c3d2.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = pkgs.runCommandNoCC "adsb-map" {} ''
|
|
|
|
mkdir $out
|
2021-10-13 22:55:21 +02:00
|
|
|
cp ${./adsb.html} $out/index.html
|
2021-10-13 23:44:24 +02:00
|
|
|
cp ${./airplane.svg} $out/airplane.svg
|
2021-10-13 22:53:27 +02:00
|
|
|
'';
|
|
|
|
extraConfig = ''
|
|
|
|
index index.html;
|
|
|
|
charset utf-8;
|
|
|
|
'';
|
2022-02-22 00:16:52 +01:00
|
|
|
locations."/aircraft.json" = {
|
|
|
|
proxyPass = "http://radiobert.serv.zentralwerk.org/aircraft.json";
|
2021-10-13 22:53:27 +02:00
|
|
|
};
|
|
|
|
};
|
2021-10-07 23:00:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.openwebrx.enable = true;
|
|
|
|
|
2021-10-13 21:44:04 +02:00
|
|
|
services.collectd.plugins = {
|
|
|
|
curl_json = ''
|
|
|
|
<URL "http://localhost:8073/metrics.json">
|
|
|
|
Plugin "openwebrx_decodes"
|
|
|
|
<Key "wsjt/decodes/*/*/count">
|
|
|
|
Type "counter"
|
|
|
|
</Key>
|
|
|
|
<Key "aprs/decodes/*/*/*/count">
|
|
|
|
Type "counter"
|
|
|
|
</Key>
|
|
|
|
<Key "js8call/decodes/*/*/count">
|
|
|
|
Type "counter"
|
|
|
|
</Key>
|
|
|
|
<Key "decoding/queue/*/count">
|
|
|
|
Type "counter"
|
|
|
|
</Key>
|
|
|
|
<Key "decoding/queue/length">
|
|
|
|
Type "gauge"
|
|
|
|
</Key>
|
|
|
|
<Key "pskreporter/*/count">
|
|
|
|
Type "gauge"
|
|
|
|
</Key>
|
|
|
|
<Key "wsprnet/*/count">
|
|
|
|
Type "gauge"
|
|
|
|
</Key>
|
|
|
|
<Key "openwebrx/users">
|
|
|
|
Type "gauge"
|
|
|
|
</Key>
|
|
|
|
</URL>
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-10-30 02:02:08 +02:00
|
|
|
services.heliwatch = {
|
|
|
|
enable = true;
|
2021-10-31 19:00:03 +01:00
|
|
|
inherit (pkgs.mucbot) jid;
|
|
|
|
inherit (pkgs.mucbot) password;
|
2021-10-30 02:02:08 +02:00
|
|
|
muc = "luftraum@chat.c3d2.de/Hubschraubereinsatz";
|
|
|
|
};
|
|
|
|
|
2021-10-07 23:00:50 +02:00
|
|
|
# noXlibs breaks cairo:
|
|
|
|
environment.noXlibs = false;
|
|
|
|
}
|