2022-04-16 22:21:51 +02:00
|
|
|
{ config, depot, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
systemd.services.tgsa = {
|
|
|
|
description = "telegram -> SA bbcode thing";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
|
|
|
serviceConfig = {
|
2023-05-24 18:13:23 +02:00
|
|
|
EnvironmentFile = "/root/tgsa-env"; # TODO(tazjin): automate this
|
2022-04-16 22:21:51 +02:00
|
|
|
DynamicUser = true;
|
|
|
|
Restart = "always";
|
|
|
|
ExecStart = "${depot.users.tazjin.tgsa}/bin/tgsa";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."tgsa" = {
|
|
|
|
serverName = "tgsa.tazj.in";
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
locations."/" = {
|
2022-05-16 11:19:22 +02:00
|
|
|
proxyPass = "http://127.0.0.1:8472";
|
2022-04-16 22:21:51 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|