Configured more machines to push logs to loki

This commit is contained in:
Alejandro Angulo 2023-09-10 10:08:17 -07:00
parent 8f813f3865
commit ab218cd1a2
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
5 changed files with 11 additions and 54 deletions

View file

@ -11,14 +11,6 @@ with lib; let
in {
options.aa.services.loki = with types; {
enable = mkEnableOption "loki";
acmeCertName = mkOption {
type = str;
default = "";
description = ''
If set to a non-empty string, forces SSL with the supplied acme
certificate.
'';
};
};
config = mkIf cfg.enable {
@ -103,20 +95,8 @@ in {
};
};
services.nginx = mkIf (cfg.acmeCertName != "") {
enable = true;
# Confirm with /loki/api/v1/status/buildinfo
virtualHosts."loki.${cfg.acmeCertName}" = {
locations."/" = {
proxyPass = "http://localhost:${toString loki.configuration.server.http_listen_port}";
};
forceSSL = true;
useACMEHost = cfg.acmeCertName;
};
};
networking.firewall = {
allowedTCPPorts = [80 443];
allowedTCPPorts = [loki.configuration.server.http_listen_port];
};
};
}