From ca3cfc841aa9a064462b19b4559efa06433d9725 Mon Sep 17 00:00:00 2001 From: emilylange Date: Sat, 10 Feb 2024 20:47:04 +0100 Subject: [PATCH] nixos/gitea: warn when using `services.gitea` with forgejo since this is no longer supported and we have a dedicated module for forgejo for quite some time now. Such warning is, however, becoming more and more important, since forgejo is no longer a soft-fork of gitea, but rather a hard-fork. And as such, it will slowly but surely no longer be a drop-in replacement. Additionally, I hope that this warning will prevent users from reporting issues with forgejo to nixos/gitea maintainers. The accompanying forgejo.md, from which the manual section is created, will be updated over the next few weeks when forgejo officially publishes their blog post about all this and the way forward, so we can link to it. --- nixos/modules/services/misc/gitea.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index d0135b2ba7ac..08feea853e47 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -681,6 +681,11 @@ in optional (cfg.database.password != "") "config.services.gitea.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead." ++ optional (cfg.extraConfig != null) '' services.gitea.`extraConfig` is deprecated, please use services.gitea.`settings`. + '' ++ + optional (lib.getName cfg.package == "forgejo") '' + Running forgejo via services.gitea.package is no longer supported. + Please use services.forgejo instead. + See https://nixos.org/manual/nixos/unstable/#module-forgejo for migration instructions. ''; # Create database passwordFile default when password is configured.