Merge pull request #10227 from bjornfor/jenkins-envvars
nixos/jenkins: rework environment handling
This commit is contained in:
commit
a61e26a63d
@ -65,11 +65,14 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment = mkOption {
|
environment = mkOption {
|
||||||
default = { NIX_REMOTE = "daemon"; };
|
default = { };
|
||||||
type = with types; attrsOf str;
|
type = with types; attrsOf str;
|
||||||
description = ''
|
description = ''
|
||||||
Additional environment variables to be passed to the jenkins process.
|
Additional environment variables to be passed to the jenkins process.
|
||||||
The environment will always include JENKINS_HOME.
|
This setting will merge with everything in
|
||||||
|
<option>config.environment.sessionVariables</option>,
|
||||||
|
JENKINS_HOME and NIX_REMOTE. This option takes precedence and can
|
||||||
|
override any previously set environment variable.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -106,9 +109,12 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment = {
|
environment =
|
||||||
JENKINS_HOME = cfg.home;
|
config.environment.sessionVariables //
|
||||||
} // cfg.environment;
|
{ JENKINS_HOME = cfg.home;
|
||||||
|
NIX_REMOTE = "daemon";
|
||||||
|
} //
|
||||||
|
cfg.environment;
|
||||||
|
|
||||||
path = cfg.packages;
|
path = cfg.packages;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user