WIP dump1090-fa service
Some checks failed
EVAL aarch64-linux.sisko
BUILD aarch64-linux.sisko
UPLOAD aarch64-linux.sisko
DOWNLOAD aarch64-linux.sisko
CACHIX aarch64-linux.sisko
ATTIC aarch64-linux.sisko
/ test (push) Successful in 45s

This commit is contained in:
Andrea Ciceri 2025-02-09 12:03:04 +01:00
parent 895c257573
commit d8f1e5318a
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 46 additions and 0 deletions

View file

@ -41,6 +41,7 @@
"adb" "adb"
"prometheus-exporters" "prometheus-exporters"
"promtail" "promtail"
"dump1090"
] ]
++ [ ./disko.nix ]; ++ [ ./disko.nix ];

View file

@ -0,0 +1,45 @@
{ pkgs, lib, ... }:
{
systemd.services.dump1090-fa = {
description = "dump1090 ADS-B receiver (FlightAware customization)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = true;
SupplementaryGroups = "plugdev";
ExecStart = lib.escapeShellArgs [
(lib.getExe pkgs.dump1090)
"--net"
"--write-json"
"%t/dump1090-fa"
];
RuntimeDirectory = "dump1090-fa";
WorkingDirectory = "%t/dump1090-fa";
RuntimeDirectoryMode = 755;
};
};
services.nginx = {
enable = true;
virtualHosts."dump1090-fa" = {
listen = [
{
addr = "0.0.0.0";
port = 8080;
}
];
locations = {
"/".alias = "${pkgs.dump1090}/share/dump1090/";
"/data/".alias = "/run/dump1090-fa/";
};
};
};
# TODO before upstreaming in nixpkgs
# - add `meta.mainProgram` to dump1090
# - rename dump1090 to dump1090-fa
# - optionally create an alias for dump1090
# - securing the systemd service (`systemd-analyze security dump1090-fa`)
}