dotfiles/container/adsb/default.nix

132 lines
4.1 KiB
Nix
Raw Normal View History

2022-08-02 16:44:26 +00:00
let
secret = import ../../secret/container/adsb;
in
{
2023-03-19 12:04:48 +00:00
virtualisation.oci-containers.containers = {
readsb = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
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";
2022-08-02 16:44:26 +00:00
};
2023-03-19 12:04:48 +00:00
volumes = [
"/etc/container-adsb/readsb/autogain:/run/autogain"
];
extraOptions = [
"--device=/dev/bus/usb:/dev/bus/usb"
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
2022-08-02 16:44:26 +00:00
2023-03-19 12:04:48 +00:00
mlathub = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
2023-06-26 11:07:19 +00:00
# dependsOn = [ "readsb" "piaware" ];
2023-03-19 12:04:48 +00:00
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";
"READSB_NET_BEAST_OUTPUT_PORT" = "30105";
2022-08-02 16:44:26 +00:00
};
2023-03-19 12:04:48 +00:00
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
2022-08-02 16:44:26 +00:00
2023-03-19 12:04:48 +00:00
tar1090 = {
image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest";
2023-06-26 11:07:19 +00:00
# dependsOn = [ "readsb" "mlathub" ];
2023-03-19 12:04:48 +00:00
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;
"HEYWHATSTHAT_PANORAMA_ID" = secret.container.adsb.tar1090.heywhatsthatId;
"TAR1090_FLIGHTAWARELINKS" = "true";
"TAR1090_DISPLAYUNITS" = "metric";
2022-08-02 16:44:26 +00:00
};
2023-03-19 12:04:48 +00:00
volumes = [
"/etc/container-adsb/tar1090/heatmap:/var/globe_history"
];
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
2022-08-02 16:44:26 +00:00
2023-03-19 12:04:48 +00:00
fr24feed = {
image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest";
2023-06-26 11:07:19 +00:00
# dependsOn = [ "readsb" ];
2023-03-19 12:04:48 +00:00
environment = {
"TZ" = "Europe/Berlin";
"BEASTHOST" = "readsb";
"BEASTPORT" = "30005";
"MLAT" = "yes";
"FR24KEY" = secret.container.adsb.fr24feed.key;
2022-08-02 16:44:26 +00:00
};
2023-03-19 12:04:48 +00:00
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
2022-08-02 16:44:26 +00:00
2023-03-19 12:04:48 +00:00
piaware = {
image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest";
2023-06-26 11:07:19 +00:00
# dependsOn = [ "readsb" ];
2023-03-19 12:04:48 +00:00
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;
"FEEDER_ID" = secret.container.adsb.piaware.feederId;
2022-08-02 16:44:26 +00:00
};
2023-03-19 12:04:48 +00:00
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
2022-08-02 16:44:26 +00:00
};
};
2023-03-19 12:04:48 +00:00
systemd.tmpfiles.rules = [
"d /etc/container-adsb 0755 root root"
"d /etc/container-adsb/readsb 0755 1000 1000"
"d /etc/container-adsb/readsb/autogain 0755 1000 1000"
"d /etc/container-adsb/tar1090 0755 1000 1000"
"d /etc/container-adsb/tar1090/heatmap 0755 1000 1000"
];
}