-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/forgejo: fork from nixos/gitea (split) #248310
Conversation
Following a decicion from both the gitea and forgejo maintainers in nixpkgs. This means, that forgejo will no longer co-use the nixos/gitea module via `services.gitea.package = pkgs.forgejo`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched my forgejo instance from the gitea module to this module. Everything seems to be in order.
Here are the steps that worked for me:
roughly (from memory; for postgres backend) systemctl stop gitea
mv /var/lib/gitea /var/lib/forgejo
runuser -u postgres -- psql -c '
ALTER USER gitea RENAME TO forgejo;
ALTER DATABASE gitea RENAME TO forgejo;
'
nixos-rebuild switch
chown -R forgejo:forgejo /var/lib/forgejo
systemctl restart forgejo |
been running on this for a few weeks now, and I think it's ready |
@ofborg test forgejo |
I don't understand why this was done. This makes migrating from gitea to forgejo unnecessarily hard for no technically reason. I could still just change services.gitea.package to forgejo and it would probably just work out of the box.
This is what we are being told for almost a year now but I don't see it coming. The promised features like federation are still not available and forgejo is right now mostly a reskin of gitea with some detail changes. What I am trying to express is that I am rather disappointed with the current situation. |
@SuperSandro2000 noted. I understand your frustration with this, but I can only ask you to propose any improvement that you may have, in a fresh issue. |
IMHO this is a breaking change or at least important-enough module addition that it should provide corresponding release notes entries.
I do understand the concern of forgejo becoming incompatible (enough) at some future point mandating a dedicated module. With the software being well compatible still, that could even be a good reason to do this now. If the forgejo-with-gitea-module to forgejo-with-forgejo-moduel was either automatic or at least trivially smooth, I'd be more welcoming of this module fork though. |
@schmittlauch This is not a breaking change, since it does not break anything that would have worked otherwise. I have typed out migration instructions above. My intention is to verify these on another machine, and then prepare release notes alongside a runtime warning for when I understand your concerns about smoothing out the migration path (and, in fact, share some of them), but I feel like we need to separate out the arguments a bit:
All that said: I share your interest in getting in proper release notes and documenting the migration path, and if you have a good idea on where to put that migration script, I'd be grateful. I don't share your concerns about needing manual intervention: You can, in fact, configure the forgejo module such that it would use the gitea user/database/folder, in order to migrate without requiring manual intervention at all. Thinking about it, that would probably be good to document that as another possible migration path. In fact, despite having brought up this point myself before, I'm now more in favor of giving forgejo its separate infrastructure:
I'll try to get the forgejo module with all the docs sewn-up in time for this release, help is welcome. |
Description of changes
See
The new nixos/forgejo module is a slightly refactored version of nixos/gitea, but stays as compatible as possible for now.
With the exception being completely removing the already deprecated
cfg.extraConfig
andcfg.database.password
options.Migrating an existing forgejo instance using nixos/gitea needs to be done manually.
Mainly, moving
/var/lib/gitea
to/var/lib/forgejo
and, in case of PSQL/MySQL either renaming the database or changing thecfg.database.name
option to"gitea"
.But it has yet to be decided where to put detailed migration instructions.
In the future, nixos/forgejo and nixos/gitea will further diverge.
And it would probably make sense to have a little warning/trace/hint in nixos/gitea when
cfg.package =
pkgs.forgejo` is used, so users are made aware of the new nixos/forgejo module and don't report issues to nixos/gitea anymore.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)