Merge pull request #231096 from kai-tub/vector/add-pkg-opt
vector: add `package` Option
This commit is contained in:
commit
3c09f66193
|
@ -8,6 +8,8 @@ in
|
|||
options.services.vector = {
|
||||
enable = mkEnableOption (lib.mdDoc "Vector");
|
||||
|
||||
package = mkPackageOptionMD pkgs "vector" { };
|
||||
|
||||
journaldAccess = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -47,7 +49,7 @@ in
|
|||
'';
|
||||
in
|
||||
{
|
||||
ExecStart = "${pkgs.vector}/bin/vector --config ${validateConfig conf}";
|
||||
ExecStart = "${getExe cfg.package} --config ${validateConfig conf}";
|
||||
DynamicUser = true;
|
||||
Restart = "no";
|
||||
StateDirectory = "vector";
|
||||
|
|
|
@ -31,7 +31,7 @@ with pkgs.lib;
|
|||
# ensure vector is forwarding the messages appropriately
|
||||
testScript = ''
|
||||
machine.wait_for_unit("vector.service")
|
||||
machine.succeed("test -f /var/lib/vector/logs.log")
|
||||
machine.wait_for_file("/var/lib/vector/logs.log")
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue