bert: Add owntracks-recorder
This commit is contained in:
parent
9b6c2fdc3e
commit
4c6606be31
|
@ -9,6 +9,7 @@
|
|||
./services/monitoring.nix
|
||||
./services/forgejo.nix
|
||||
./services/navidrome.nix
|
||||
./services/owntracks-recorder.nix
|
||||
];
|
||||
|
||||
# Bootloader
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
./preview.chandlerswift.com.nix
|
||||
./stjohnscccc.org.nix
|
||||
./swiftgang.net.nix
|
||||
./whereis.chandlerswift.com.nix
|
||||
];
|
||||
|
||||
services.caddy = {
|
||||
|
|
9
bert/services/http/whereis.chandlerswift.com.nix
Normal file
9
bert/services/http/whereis.chandlerswift.com.nix
Normal 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}"
|
||||
}
|
||||
'';
|
||||
}
|
19
bert/services/owntracks-recorder.nix
Normal file
19
bert/services/owntracks-recorder.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue