2022-01-16 13:26:37 +01:00
|
|
|
{ zentralwerk, config, pkgs, ... }:
|
2021-10-07 23:00:50 +02:00
|
|
|
{
|
2022-06-19 22:29:08 +02:00
|
|
|
microvm.mem = 4096;
|
2021-10-13 21:44:04 +02:00
|
|
|
c3d2 = {
|
|
|
|
isInHq = false;
|
|
|
|
hq.statistics.enable = true;
|
2022-06-19 22:29:08 +02:00
|
|
|
deployment = {
|
2022-07-10 20:51:26 +02:00
|
|
|
server = "nomad";
|
|
|
|
mounts = [ "etc" "home" "var" ];
|
|
|
|
mountBase = "/glusterfs/fast/microvms/${config.networking.hostName}";
|
2022-06-19 22:29:08 +02:00
|
|
|
};
|
2021-10-13 21:44:04 +02:00
|
|
|
};
|
|
|
|
|
2022-06-21 18:32:15 +02:00
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
2021-10-07 23:00:50 +02:00
|
|
|
networking.hostName = "sdrweb";
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
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-03-10 17:43:43 +01:00
|
|
|
locations."/data.json" = {
|
|
|
|
proxyPass = "http://${config.c3d2.hosts.radiobert.ip4}:8080/data.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;
|
|
|
|
}
|