1
0
Fork 0
dotfiles/container/adsb/default.nix

174 lines
5.5 KiB
Nix
Raw Normal View History

2022-08-02 16:44:26 +00:00
let
secret = import ../../secret/container/adsb;
custom-config = import ./config.nix;
in
{
virtualisation.arion.projects.adsb.settings = {
services = {
readsb = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
container_name = "readsb";
hostname = "readsb";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
environment = {
"TZ" = "Europe/Berlin";
"DISABLE_PERFORMANCE_GRAPHS" = "true";
"DISABLE_WEBAPP" = "true";
"READSB_NET_ENABLE" = "true";
"READSB_DCFILTER" = "true";
"READSB_FIX" = "true";
"READSB_GAIN" = "autogain";
"READSB_LAT" = secret.container.adsb.readsb.lat;
"READSB_LON" = secret.container.adsb.readsb.lon;
"READSB_MODEAC" = "true";
"READSB_RX_LOCATION_ACCURACY" = "2";
};
devices = [ "/dev/bus/usb:/dev/bus/usb" ];
volumes = [
"/etc/container-adsb/readsb/autogain:/run/autogain"
];
2022-08-02 21:53:03 +00:00
tmpfs = [
"/run:exec,size=64M"
"/var/log:size=32M"
];
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
mlathub = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
container_name = "mlathub";
hostname = "mlathub";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
depends_on = [ "readsb" "piaware" "adsbexchange" ];
environment = {
"TZ" = "Europe/Berlin";
"DISABLE_PERFORMANCE_GRAPHS" = "true";
"DISABLE_WEBAPP" = "true";
"READSB_NET_ENABLE" = "true";
"READSB_NET_ONLY" = "true";
"READSB_FORWARD_MLAT" = "true";
"READSB_NET_CONNECTOR" = "piaware,30105,beast_in;adsbexchange,30105,beast_in";
"READSB_NET_BEAST_OUTPUT_PORT" = "30105";
};
2022-08-02 21:53:03 +00:00
tmpfs = [
"/run:exec,size=64M"
"/var/log:size=32M"
];
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
tar1090 = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest";
container_name = "tar1090";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
depends_on = [ "readsb" "mlathub" ];
ports = [ "8081:80" ];
environment = {
"TZ" = "Europe/Berlin";
"BEASTHOST" = "readsb";
"BEASTPORT" = "30005";
"MLATHOST" = "mlathub";
"MLATPORT" = "30105";
"LAT" = secret.container.adsb.readsb.lat;
"LONG" = secret.container.adsb.readsb.lon;
2022-08-04 18:11:40 +00:00
"HEYWHATSTHAT_PANORAMA_ID" = secret.container.adsb.tar1090.heywhatsthatId;
2022-08-02 16:44:26 +00:00
"TAR1090_FLIGHTAWARELINKS" = "true";
"TAR1090_DISPLAYUNITS" = "metric";
};
volumes = [
"/etc/container-adsb/tar1090/heatmap:/var/globe_history"
];
tmpfs = [
"/run:exec,size=64M"
"/var/log"
];
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
adsbexchange = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-adsbexchange:latest";
container_name = "adsbexchange";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
depends_on = [ "readsb" ];
environment = {
"TZ" = "Europe/Berlin";
"BEASTHOST" = "readsb";
"BEASTPORT" = "30005";
"LAT" = secret.container.adsb.readsb.lat;
"LONG" = secret.container.adsb.readsb.lon;
"ALT" = "70m";
"SITENAME" = secret.container.adsb.adsbexchange.sitename;
2022-08-02 17:04:10 +00:00
"PRIVATE_MLAT" = "true";
2022-08-02 16:44:26 +00:00
"UUID" = secret.container.adsb.adsbexchange.uuid;
};
tmpfs = [
"/run:rw,nosuid,nodev,exec,relatime,size=64M,uid=1000,gid=1000"
];
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
fr24feed = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest";
container_name = "fr24feed";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
depends_on = [ "readsb" ];
environment = {
"TZ" = "Europe/Berlin";
"BEASTHOST" = "readsb";
"BEASTPORT" = "30005";
"MLAT" = "yes";
"FR24KEY" = secret.container.adsb.fr24feed.key;
};
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
piaware = {
service = {
image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest";
container_name = "piaware";
2022-08-02 19:05:58 +00:00
restart = "unless-stopped";
2022-08-02 16:44:26 +00:00
depends_on = [ "readsb" ];
environment = {
"TZ" = "Europe/Berlin";
"RECEIVER_TYPE" = "relay";
"BEASTHOST" = "readsb";
"BEASTPORT" = "30005";
"ALLOW_MLAT" = "yes";
"MLAT_RESULTS" = "yes";
"LAT" = secret.container.adsb.readsb.lat;
"LONG" = secret.container.adsb.readsb.lon;
2022-08-04 18:11:40 +00:00
"FEEDER_ID" = secret.container.adsb.piaware.feederId;
2022-08-02 16:44:26 +00:00
};
tmpfs = [
"/run:exec,size=64M"
"/var/log"
];
2022-08-04 22:40:11 +00:00
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
2022-08-02 16:44:26 +00:00
};
};
};
};
} // custom-config