nix-config/hosts/containers/sdrweb/default.nix

70 lines
1.6 KiB
Nix
Raw Normal View History

2021-10-07 23:00:50 +02:00
{ hostRegistry, config, ... }:
{
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 = [{
address = hostRegistry.hosts.${config.networking.hostName}.ip4;
prefixLength = 26;
}];
networking.defaultGateway = "172.20.73.1";
# http https
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."sdr.hq.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8073";
proxyWebsockets = true;
};
};
};
services.openwebrx.enable = true;
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-07 23:00:50 +02:00
# noXlibs breaks cairo:
environment.noXlibs = false;
}