nixos/buildkite-agent: add a shell attribute to specify the shell being used

This gets passed to BUILDKITE_SHELL, which will specify the shell being
used to executes script in.

Defaults to `${pkgs.bash}/bin/bash -e -c`, matching how buildkite
behaves on other distros.
This commit is contained in:
Yorick van Pelt 2018-09-06 14:02:55 +02:00 committed by Florian Klink
parent 8f19d72113
commit e1ad9d1685

View File

@ -174,6 +174,14 @@ in
instead.
'';
};
shell = mkOption {
type = types.str;
default = "${pkgs.bash}/bin/bash -e -c";
description = ''
Command that buildkite-agent 3 will execute when it spawns a shell.
'';
};
};
};
@ -216,6 +224,7 @@ in
token="$(cat ${toString cfg.tokenPath})"
name="${cfg.name}"
${metaData}
shell="${cfg.shell}"
build-path="${cfg.dataDir}/builds"
hooks-path="${cfg.hooksPath}"
${cfg.extraConfig}