From c9d1defa330dfb15997b4ffaa05467c548505b0b Mon Sep 17 00:00:00 2001 From: Samuel Leathers Date: Thu, 17 Oct 2019 14:40:49 -0400 Subject: [PATCH] buildkite: add preCommands option --- modules/services/buildkite-agent.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/services/buildkite-agent.nix b/modules/services/buildkite-agent.nix index 936446d..ace89ec 100644 --- a/modules/services/buildkite-agent.nix +++ b/modules/services/buildkite-agent.nix @@ -89,6 +89,13 @@ in Extra lines to be added verbatim to the configuration file. ''; }; + services.buildkite-agent.preCommands = mkOption { + type = types.lines; + default = ""; + description = '' + Extra commands to run before starting buildkite. + ''; + }; services.buildkite-agent.openssh = { privateKeyPath = mkOption { @@ -215,6 +222,8 @@ in chmod 750 "${cfg.dataDir}" chmod 640 "${cfg.dataDir}/buildkite-agent.cfg" + ${cfg.preCommands} + exec buildkite-agent start --config "${cfg.dataDir}/buildkite-agent.cfg" '';