feat: install owntracks backend
This commit is contained in:
parent
9793215fed
commit
0a57515130
2 changed files with 40 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
"miniflux"
|
"miniflux"
|
||||||
"nginx"
|
"nginx"
|
||||||
"ntfy-sh"
|
"ntfy-sh"
|
||||||
|
"owntracks"
|
||||||
"paperless"
|
"paperless"
|
||||||
"prowlarr"
|
"prowlarr"
|
||||||
"qbittorrent"
|
"qbittorrent"
|
||||||
|
|
|
||||||
39
modules/nixos/features/owntracks.nix
Normal file
39
modules/nixos/features/owntracks.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue