fix: pass port into owntracks-recorder config as a string, not an int

This commit is contained in:
wi11-holdsworth 2025-10-22 18:07:43 +11:00
parent 66787f06e7
commit cac7aedbba

View file

@ -1,8 +1,5 @@
{ {
# keep-sorted start
lib,
pkgs, pkgs,
# keep-sorted end
... ...
}: }:
let let
@ -18,7 +15,7 @@ in
${pkgs.owntracks-recorder}/bin/ot-recorder \ ${pkgs.owntracks-recorder}/bin/ot-recorder \
--storage /var/lib/owntracks/recorder/store \ --storage /var/lib/owntracks/recorder/store \
--port 0 --port 0
--http-port ${lib.toInt port} --http-port ${port}
--http-host https://${host} --http-host https://${host}
''; '';
DynamicUser = true; DynamicUser = true;
@ -30,10 +27,15 @@ in
services = { services = {
# borgbackup.jobs = owntracks { }; # borgbackup.jobs = owntracks { };
nginx.virtualHosts.${host} = { nginx.virtualHosts.${host} =
let
owntracks-frontend = pkgs.callPackage ./owntracks-frontend.nix;
in
{
forceSSL = true; forceSSL = true;
useACMEHost = "fi33.buzz"; useACMEHost = "fi33.buzz";
locations."/".proxyPass = "http://localhost:${port}"; root = "/var/www/html";
locations."/owntracks/".alias = "${owntracks-frontend}";
}; };
}; };
} }