bert: Add owntracks-recorder

This commit is contained in:
Chandler Swift 2025-01-14 23:12:25 -06:00
parent 9b6c2fdc3e
commit 4c6606be31
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
4 changed files with 30 additions and 0 deletions

View file

@ -9,6 +9,7 @@
./services/monitoring.nix
./services/forgejo.nix
./services/navidrome.nix
./services/owntracks-recorder.nix
];
# Bootloader

View file

@ -14,6 +14,7 @@
./preview.chandlerswift.com.nix
./stjohnscccc.org.nix
./swiftgang.net.nix
./whereis.chandlerswift.com.nix
];
services.caddy = {

View file

@ -0,0 +1,9 @@
{config, ...}: {
services.caddy.virtualHosts."whereis.chandlerswift.com".extraConfig = ''
reverse_proxy localhost:8083
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
}

View file

@ -0,0 +1,19 @@
{pkgs, ...}:
let # off my branch until https://github.com/NixOS/nixpkgs/pull/373934 is merged
package = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/7ebad821473c78c7cfdf17ecf9f9be91d2455d81.tar.gz") {}).owntracks-recorder;
in
{
systemd.services.owntracks-recorder = {
enable = true;
description = "owntracks-recorder Service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${package}/bin/ot-recorder --storage /var/lib/owntracks --port 0";
DynamicUser = true;
StateDirectory = "owntracks";
StateDirectoryMode = "0775";
WorkingDirectory = "/var/lib/owntracks";
};
};
}