git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/gitlab: add extraEnv option

This allows users to define custom environment variables for gitlab, without having to modify the service file directly

commit7135ac0e005453a8e94854ded879fd1bcc741220 authorMaciej Krüger <mkg20001@gmail.com> dateTue 8 Jun 2021, 21:29 (5 years ago) parent960d10a
1 file changed+9−1
nixos/modules/services/misc/gitlab.nix+9−1
nixos/modules/services/misc/gitlab.nix+9−1
@@ -156,7 +156,7 @@ let
156156 prometheus_multiproc_dir = "/run/gitlab";
157157 RAILS_ENV = "production";
158158 MALLOC_ARENA_MAX = "2";
159− };
159+ } // cfg.extraEnv;
160160
161161 gitlab-rake = pkgs.stdenv.mkDerivation {
162162 name = "gitlab-rake";
@@ -277,6 +277,14 @@ in {
277277 '';
278278 };
279279
280+ extraEnv = mkOption {
281+ type = types.attrsOf types.str;
282+ default = {};
283+ description = ''
284+ Additional environment variables for the GitLab environment.
285+ '';
286+ };
287+
280288 backup.startAt = mkOption {
281289 type = with types; either str (listOf str);
282290 default = [];