Skip to content

Commit

Permalink
Merge pull request NixOS#168 from input-output-hk/pre-commands-buildkite
Browse files Browse the repository at this point in the history
buildkite: add preCommands option
  • Loading branch information
LnL7 committed Jan 28, 2020
2 parents a14315c + c9d1def commit 3201be1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/services/buildkite-agent.nix
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"
'';

Expand Down

0 comments on commit 3201be1

Please sign in to comment.