Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion nixos/modules/services/logging/vector.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ in
'';
};

gracefulShutdownLimitSecs = lib.mkOption {
type = lib.types.ints.positive;
default = 60;
description = ''
Set the duration in seconds to wait for graceful shutdown after SIGINT or SIGTERM are received.
After the duration has passed, Vector will force shutdown.
'';
};

settings = lib.mkOption {
type = (pkgs.formats.json { }).type;
default = { };
Expand Down Expand Up @@ -56,7 +65,7 @@ in
'';
in
{
ExecStart = "${lib.getExe cfg.package} --config ${validateConfig conf}";
ExecStart = "${lib.getExe cfg.package} --config ${validateConfig conf} --graceful-shutdown-limit-secs ${builtins.toString cfg.gracefulShutdownLimitSecs}";
DynamicUser = true;
Restart = "always";
StateDirectory = "vector";
Expand Down