From a01bb4e8ce573a2aae7ad87f0c617e3154c4cbfb Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sun, 23 Jan 2022 11:51:39 +0100 Subject: [PATCH 1/2] promtail: add package --- pkgs/top-level/all-packages.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c387d041fdf..9a9e48049d5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21016,6 +21016,12 @@ with pkgs; buildGoModule = buildGo116Module; }; + promtail = grafana-loki.overrideAttrs (o: { + pname = "promtail"; + subPackages = ["clients/cmd/promtail"]; + CGO_ENABLED = 1; + }); + grafana_reporter = callPackage ../servers/monitoring/grafana-reporter { }; grafana-image-renderer = callPackage ../servers/monitoring/grafana-image-renderer { }; From 3e4ce974302e58b7d5ef90c41239cea3712d6160 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sun, 23 Jan 2022 11:50:19 +0100 Subject: [PATCH 2/2] nixos/promtail: use promtail package --- nixos/modules/services/logging/promtail.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index 95c83796ece6..a34bc07b6ab2 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -45,7 +45,7 @@ in { Restart = "on-failure"; TimeoutStopSec = 10; - ExecStart = "${pkgs.grafana-loki}/bin/promtail -config.file=${prettyJSON cfg.configuration} ${escapeShellArgs cfg.extraFlags}"; + ExecStart = "${pkgs.promtail}/bin/promtail -config.file=${prettyJSON cfg.configuration} ${escapeShellArgs cfg.extraFlags}"; ProtectSystem = "strict"; ProtectHome = true;