nixos/gitlab: require at least postgresql 12

This commit is contained in:
Yureka 2021-06-23 13:08:34 +02:00
parent facd0c68cc
commit 2297eb35e5

View File

@ -10,7 +10,7 @@ let
postgresqlPackage = if config.services.postgresql.enable then postgresqlPackage = if config.services.postgresql.enable then
config.services.postgresql.package config.services.postgresql.package
else else
pkgs.postgresql; pkgs.postgresql_12;
gitlabSocket = "${cfg.statePath}/tmp/sockets/gitlab.socket"; gitlabSocket = "${cfg.statePath}/tmp/sockets/gitlab.socket";
gitalySocket = "${cfg.statePath}/tmp/sockets/gitaly.socket"; gitalySocket = "${cfg.statePath}/tmp/sockets/gitaly.socket";
@ -841,6 +841,10 @@ in {
assertion = cfg.secrets.jwsFile != null; assertion = cfg.secrets.jwsFile != null;
message = "services.gitlab.secrets.jwsFile must be set!"; message = "services.gitlab.secrets.jwsFile must be set!";
} }
{
assertion = versionAtLeast postgresqlPackage.version "12.0.0";
message = "PostgreSQL >=12 is required to run GitLab 14.";
}
]; ];
environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ]; environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ];