nix-config/modules/data-hoarder/datacare.nix

42 lines
1.0 KiB
Nix
Raw Normal View History

{ config, ... }: {
2022-12-30 18:29:13 +01:00
TLMS.datacare = {
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;
};
saltFile = config.sops.secrets.postgres_password_hash_salt.path;
user = "datacare";
group = config.users.groups.postgres-dvbdump.name;
};
systemd.services."datacare" = {
after = [ "postgresql.service" ];
wants = [ "postgresql.service" ];
};
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
2022-12-30 18:29:13 +01:00
"datacare.${config.deployment-TLMS.domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
2022-12-30 18:29:13 +01:00
proxyPass = with config.TLMS.datacare; "http://${host}:${toString port}/";
proxyWebsockets = true;
};
};
};
};
};
};
}