2022-07-10 15:27:31 +02:00
|
|
|
{ config, ... }: {
|
2022-12-30 18:29:13 +01:00
|
|
|
TLMS.datacare = {
|
2022-07-10 15:27:31 +02:00
|
|
|
enable = true;
|
|
|
|
host = "127.0.0.1";
|
|
|
|
port = 8070;
|
2023-01-12 23:19:07 +01:00
|
|
|
database = {
|
|
|
|
host = "127.0.0.1";
|
|
|
|
port = config.services.postgresql.port;
|
|
|
|
user = "dvbdump";
|
|
|
|
database = "dvbdump";
|
|
|
|
passwordFile = config.sops.secrets.postgres_password.path;
|
|
|
|
};
|
2022-07-10 15:27:31 +02:00
|
|
|
saltFile = config.sops.secrets.postgres_password_hash_salt.path;
|
2022-12-23 01:02:06 +01:00
|
|
|
user = "datacare";
|
2022-07-10 15:27:31 +02:00
|
|
|
group = config.users.groups.postgres-dvbdump.name;
|
|
|
|
};
|
2022-12-23 01:02:06 +01:00
|
|
|
systemd.services."datacare" = {
|
2022-07-13 18:19:46 +02:00
|
|
|
after = [ "postgresql.service" ];
|
|
|
|
wants = [ "postgresql.service" ];
|
|
|
|
};
|
|
|
|
|
2022-07-10 15:27:31 +02:00
|
|
|
|
|
|
|
services = {
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
virtualHosts = {
|
2022-12-30 18:29:13 +01:00
|
|
|
"datacare.${config.deployment-TLMS.domain}" = {
|
2022-07-10 15:27:31 +02:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
2022-12-30 18:29:13 +01:00
|
|
|
proxyPass = with config.TLMS.datacare; "http://${host}:${toString port}/";
|
2022-07-10 15:27:31 +02:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|