gitlab-runner service: allow adding additional tools to PATH
This is similar to how it is implemented for the Jenkins service. Bash and docker-machine are added by default as they are required in many cases.
This commit is contained in:
parent
73c4a3f641
commit
233781410d
@ -96,10 +96,20 @@ in
|
|||||||
example = literalExample "pkgs.gitlab-runner_1_11";
|
example = literalExample "pkgs.gitlab-runner_1_11";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages = mkOption {
|
||||||
|
default = [ pkgs.bash pkgs.docker-machine ];
|
||||||
|
defaultText = "[ pkgs.bash pkgs.docker-machine ]";
|
||||||
|
type = types.listOf types.package;
|
||||||
|
description = ''
|
||||||
|
Packages to add to PATH for the gitlab-runner process.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.services.gitlab-runner = {
|
systemd.services.gitlab-runner = {
|
||||||
|
path = cfg.packages;
|
||||||
environment = config.networking.proxy.envVars;
|
environment = config.networking.proxy.envVars;
|
||||||
description = "Gitlab Runner";
|
description = "Gitlab Runner";
|
||||||
after = [ "network.target" ]
|
after = [ "network.target" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user