From e1ad9d16857d53aab8762249af7bd566856ed81a Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Thu, 6 Sep 2018 14:02:55 +0200 Subject: [PATCH] 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. --- .../services/continuous-integration/buildkite-agent.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/services/continuous-integration/buildkite-agent.nix b/nixos/modules/services/continuous-integration/buildkite-agent.nix index 3da1e5e79e2..00b881ffe3c 100644 --- a/nixos/modules/services/continuous-integration/buildkite-agent.nix +++ b/nixos/modules/services/continuous-integration/buildkite-agent.nix @@ -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}