From 7135ac0e005453a8e94854ded879fd1bcc741220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 8 Jun 2021 21:29:18 +0200 Subject: [PATCH] nixos/gitlab: add extraEnv option This allows users to define custom environment variables for gitlab, without having to modify the service file directly --- nixos/modules/services/misc/gitlab.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 253d87537cf..9f4af76b1cf 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -156,7 +156,7 @@ let prometheus_multiproc_dir = "/run/gitlab"; RAILS_ENV = "production"; MALLOC_ARENA_MAX = "2"; - }; + } // cfg.extraEnv; gitlab-rake = pkgs.stdenv.mkDerivation { name = "gitlab-rake"; @@ -277,6 +277,14 @@ in { ''; }; + extraEnv = mkOption { + type = types.attrsOf types.str; + default = {}; + description = '' + Additional environment variables for the GitLab environment. + ''; + }; + backup.startAt = mkOption { type = with types; either str (listOf str); default = [];