2023-01-03 03:04:24 +01:00
|
|
|
{ hostRegistry, pkgs, ... }:
|
2021-10-07 23:00:50 +02:00
|
|
|
{
|
2023-11-11 01:23:43 +01:00
|
|
|
c3d2 = {
|
|
|
|
deployment.server = "server10";
|
|
|
|
hq.statistics.enable = true;
|
2022-11-06 13:28:55 +01:00
|
|
|
};
|
2023-11-11 01:23:43 +01:00
|
|
|
|
|
|
|
# deployment = {
|
|
|
|
# mem = 4096;
|
|
|
|
# vcpu = 16;
|
|
|
|
# needForSpeed = true;
|
|
|
|
# };
|
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";
|
|
|
|
|
2023-09-15 22:51:51 +02:00
|
|
|
services = {
|
2023-11-11 05:01:55 +01:00
|
|
|
backup = {
|
|
|
|
enable = true;
|
|
|
|
paths = [ "/var/lib/private/openwebrx/" ];
|
|
|
|
};
|
|
|
|
|
2023-09-15 22:51:51 +02:00
|
|
|
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-13 22:53:27 +02:00
|
|
|
'';
|
|
|
|
};
|
2021-10-07 23:00:50 +02:00
|
|
|
|
2023-12-12 00:50:48 +01:00
|
|
|
heliwatch = {
|
|
|
|
enable = true;
|
|
|
|
jid = "astrobot@jabber.c3d2.de";
|
|
|
|
inherit (pkgs.mucbot) password;
|
|
|
|
muc = "luftraum@chat.c3d2.de/Hubschraubereinsatz";
|
|
|
|
};
|
|
|
|
|
2023-09-18 18:48:40 +02:00
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts."sdr.hq.c3d2.de" = {
|
|
|
|
default = true;
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:8073";
|
|
|
|
proxyWebsockets = true;
|
2023-09-15 22:51:51 +02:00
|
|
|
};
|
2023-09-18 18:48:40 +02:00
|
|
|
};
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2021-10-07 23:00:50 +02:00
|
|
|
|
2023-09-18 18:48:40 +02:00
|
|
|
openwebrx.enable = true;
|
2021-10-13 21:44:04 +02:00
|
|
|
};
|
|
|
|
|
2023-12-12 00:50:48 +01:00
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
2021-10-07 23:00:50 +02:00
|
|
|
}
|