vector: fix service using pkgs.vector regardless package option (#354316)

This commit is contained in:
Yt 2024-11-11 19:09:22 -05:00 committed by GitHub
commit c0c77416ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ in
config = lib.mkIf cfg.enable {
# for cli usage
environment.systemPackages = [ pkgs.vector ];
environment.systemPackages = [ cfg.package ];
systemd.services.vector = {
description = "Vector event and log aggregator";
@ -40,7 +40,7 @@ in
conf = format.generate "vector.toml" cfg.settings;
validateConfig = file:
pkgs.runCommand "validate-vector-conf" {
nativeBuildInputs = [ pkgs.vector ];
nativeBuildInputs = [ cfg.package ];
} ''
vector validate --no-environment "${file}"
ln -s "${file}" "$out"