nix-config/hosts/sdrweb/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

103 lines
2.4 KiB
Nix
Raw Normal View History

{ hostRegistry, config, pkgs, ... }:
2021-10-07 23:00:50 +02:00
{
microvm = {
mem = 2048;
vcpu = 8;
};
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;
# };
system.stateVersion = "22.05";
2021-10-07 23:00:50 +02:00
networking.hostName = "sdrweb";
2023-09-15 22:51:51 +02:00
services = {
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";
passwordFile = config.sops.secrets."heliwatch/passwordFile".path;
2023-12-12 00:50:48 +01:00
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;
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets."heliwatch/passwordFile".owner = "heliwatch";
};
2021-10-07 23:00:50 +02:00
}