summary refs log tree commit diff
diff options
context:
space:
mode:
authorYaya <mak@nyantec.com>2023-05-30 09:20:18 +0000
committerYureka <yuka@yuka.dev>2023-05-31 22:14:25 +0200
commite9594e60319bae339c8cc7211e9f773d394839ae (patch)
tree7e1d5a3eb4798db63d02f4b36c5c1eca6e7624ed
parent014816cbe46973336739c450b6b80cc00f0508fa (diff)
downloadnixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar.gz
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar.bz2
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar.lz
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar.xz
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.tar.zst
nixpkgs-e9594e60319bae339c8cc7211e9f773d394839ae.zip
nixos/gitlab: Warn users who are still using an external registry
This adds a warning for GitLab >=16.0.0 users who are still using an
external container registry such as `pkgs.docker-distribution`. Support
for external container registries has ended in GitLab 16.0 [1] and is
scheduled for removal in a future release. [2]

[1]: https://gitlab.com/gitlab-org/gitlab/-/issues/376217
[2]: https://gitlab.com/gitlab-org/gitlab/-/issues/403322
-rw-r--r--nixos/modules/services/misc/gitlab.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index 6bddb361503..bf0a1200744 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -1081,6 +1081,13 @@ in {
   };
 
   config = mkIf cfg.enable {
+    warnings = [
+      (mkIf
+        (cfg.registry.enable && versionAtLeast (getVersion cfg.packages.gitlab) "16.0.0" && cfg.registry.package == pkgs.docker-distribution)
+        ''Support for container registries other than gitlab-container-registry has ended since GitLab 16.0.0 and is scheduled for removal in a future release.
+          Please back up your data and migrate to the gitlab-container-registry package.''
+      )
+    ];
 
     assertions = [
       {