From 5eefeb3fe0dfd67f7ed5ac8178c0dfba904e1897 Mon Sep 17 00:00:00 2001 From: emilylange Date: Sat, 12 Apr 2025 22:22:48 +0200 Subject: [PATCH] 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: b61919e5e0b4a6ad12eededfee4af703a9182c4e Ref: 44aee345944600958be579ce34a93844f3fdeeb9 --- nixos/modules/services/misc/forgejo.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix index 08e1b85a7544..7da42084550d 100644 --- a/nixos/modules/services/misc/forgejo.nix +++ b/nixos/modules/services/misc/forgejo.nix @@ -722,7 +722,7 @@ in ''; serviceConfig = { - Type = "simple"; + Type = "notify"; User = cfg.user; Group = cfg.group; WorkingDirectory = cfg.stateDir;