2022-01-28 12:47:50 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2022-01-15 11:08:46 +00:00
|
|
|
services.loki = {
|
|
|
|
enable = true;
|
|
|
|
configFile = ./loki.yaml;
|
|
|
|
};
|
|
|
|
systemd.services.promtail = {
|
|
|
|
description = "Promtail service for Loki";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = ''
|
2022-01-15 11:09:28 +00:00
|
|
|
${pkgs.grafana-loki}/bin/promtail --config.file ${./promtrail.yaml}
|
2022-01-15 11:08:46 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2022-01-28 12:47:50 +00:00
|
|
|
networking.firewall.interfaces."wg0".allowedTCPPorts = [ 3100 ];
|
2022-01-15 11:08:46 +00:00
|
|
|
}
|