nix-config/modules/data-hoarder/clicky-bunty.nix

38 lines
1.0 KiB
Nix

{ config, ... }: {
dump-dvb.clickyBuntyServer = {
enable = true;
host = "127.0.0.1";
port = 8070;
postgresHost = "127.0.0.1";
postgresPort = config.services.postgresql.port;
postgresPasswordFile = config.sops.secrets.postgres_password.path;
saltFile = config.sops.secrets.postgres_password_hash_salt.path;
user = "clicky-bunty-server";
group = config.users.groups.postgres-dvbdump.name;
};
systemd.services."clicky-bunty-server" = {
after = [ "postgresql.service" ];
wants = [ "postgresql.service" ];
};
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"management-backend.${config.dump-dvb.domain}" = {
forceSSL = true;
enableACME = true;
locations = {
"/" = {
proxyPass = with config.dump-dvb.clickyBuntyServer; "http://${host}:${toString port}/";
proxyWebsockets = true;
};
};
};
};
};
};
}