feat: install owntracks backend

This commit is contained in:
wi11-holdsworth 2025-10-22 17:46:28 +11:00
parent 9793215fed
commit 0a57515130
2 changed files with 40 additions and 0 deletions

View file

@ -15,6 +15,7 @@
"miniflux" "miniflux"
"nginx" "nginx"
"ntfy-sh" "ntfy-sh"
"owntracks"
"paperless" "paperless"
"prowlarr" "prowlarr"
"qbittorrent" "qbittorrent"

View file

@ -0,0 +1,39 @@
{
# keep-sorted start
lib,
pkgs,
# keep-sorted end
...
}:
let
host = "owntracks.fi33.buzz";
port = "5014";
in
{
systemd.services.owntracks = {
enable = true;
description = "owntracks recorder";
serviceConfig = {
ExecStart = ''
${pkgs.owntracks-recorder}/bin/ot-recorder \
--storage /var/lib/owntracks/recorder/store \
--port 0
--http-port ${lib.toInt port}
--http-host https://${host}
'';
DynamicUser = true;
StateDirectory = "owntracks";
Restart = "always";
};
wantedBy = [ "multi-user.target" ];
};
services = {
# borgbackup.jobs = owntracks { };
nginx.virtualHosts.${host} = {
forceSSL = true;
useACMEHost = "fi33.buzz";
locations."/".proxyPass = "http://localhost:${port}";
};
};
}