diff --git a/modules/server/services/forgejo.nix b/modules/server/services/forgejo.nix index 6edc5f43..bde07db1 100644 --- a/modules/server/services/forgejo.nix +++ b/modules/server/services/forgejo.nix @@ -82,10 +82,13 @@ in { journalmatch = _SYSTEMD_UNIT=forgejo.service ''; }; - systemd.services.forgejo.serviceConfig = { - AmbientCapabilities = lib.mkForce [ "CAP_NET_BIND_SERVICE" ]; - CapabilityBoundingSet = lib.mkForce [ "CAP_NET_BIND_SERVICE" ]; - PrivateUsers = lib.mkForce false; + systemd.services.forgejo = { + after = [ "postgresql.service" "redis-forgejo.service" ]; + serviceConfig = { + AmbientCapabilities = lib.mkForce [ "CAP_NET_BIND_SERVICE" ]; + CapabilityBoundingSet = lib.mkForce [ "CAP_NET_BIND_SERVICE" ]; + PrivateUsers = lib.mkForce false; + }; }; }; }