nixos-config/hosts/panopticon/promtail.nix
gwg313 bb2fe56082
Some checks failed
Basic Code Checks / formatting-check (push) Has been cancelled
style
Signed-off-by: gwg313 <gwg313@pm.me>
2025-07-03 10:34:00 -04:00

32 lines
692 B
Nix

{ config, ... }:
{
systemd.tmpfiles.rules = [
"d /var/lib/promtail 0755 promtail promtail -"
];
services.promtail = {
enable = true;
configuration = {
server.http_listen_port = 9080;
server.grpc_listen_port = 0;
positions = {
filename = "/var/lib/promtail/positions.yaml";
};
clients = [
{
url = "http://localhost:3100/loki/api/v1/push";
}
];
scrape_configs = [
{
job_name = "journal";
journal = {
labels = {
job = "systemd-journal";
host = config.networking.hostName;
};
};
}
];
};
};
}