Merge pull request #10227 from bjornfor/jenkins-envvars

nixos/jenkins: rework environment handling

+11 -5
+11 -5
nixos/modules/services/continuous-integration/jenkins/default.nix
··· 65 }; 66 67 environment = mkOption { 68 - default = { NIX_REMOTE = "daemon"; }; 69 type = with types; attrsOf str; 70 description = '' 71 Additional environment variables to be passed to the jenkins process. 72 - The environment will always include JENKINS_HOME. 73 ''; 74 }; 75 ··· 106 after = [ "network.target" ]; 107 wantedBy = [ "multi-user.target" ]; 108 109 - environment = { 110 - JENKINS_HOME = cfg.home; 111 - } // cfg.environment; 112 113 path = cfg.packages; 114
··· 65 }; 66 67 environment = mkOption { 68 + default = { }; 69 type = with types; attrsOf str; 70 description = '' 71 Additional environment variables to be passed to the jenkins process. 72 + This setting will merge with everything in 73 + <option>config.environment.sessionVariables</option>, 74 + JENKINS_HOME and NIX_REMOTE. This option takes precedence and can 75 + override any previously set environment variable. 76 ''; 77 }; 78 ··· 109 after = [ "network.target" ]; 110 wantedBy = [ "multi-user.target" ]; 111 112 + environment = 113 + config.environment.sessionVariables // 114 + { JENKINS_HOME = cfg.home; 115 + NIX_REMOTE = "daemon"; 116 + } // 117 + cfg.environment; 118 119 path = cfg.packages; 120