nixos/forgejo: leverage systemd-notify support

This feature goes all the way back to v1.20.0 (mid 2023) back when
Forgejo was still a soft-fork and simply used the nixos/gitea module.

The tl;dr:
nixos/gitea enabled it as part of the Gitea 1.20 bump PR, while Forgejo
was still at 1.19.4 and did not support this yet, causing Forgejo to
get restarted after 90s by systemd in a loop. This, among other things,
was part of the reason why Forgejo forked the nixos/gitea module into
nixos/forgejo and it since moving independently in nixpkgs.

systemd-notify provides more accurate service unit states over the
previous service type "simple".

Ref: b61919e5e0
Ref: 44aee34594
This commit is contained in:
emilylange
2025-04-12 22:40:25 +02:00
parent 439e0a2445
commit 5eefeb3fe0
+1 -1
View File
@@ -722,7 +722,7 @@ in
'';
serviceConfig = {
Type = "simple";
Type = "notify";
User = cfg.user;
Group = cfg.group;
WorkingDirectory = cfg.stateDir;