fix: start tailscale before forgejo

If tailscale is not up then we can't reach the database.

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-09-19 17:37:19 +02:00
parent 34bbab282c
commit d5d3984557
Signed by: lander
GPG key ID: 0142722B4B0C536F

View file

@ -63,7 +63,10 @@ in
}; };
}; };
systemd.services.forgejo.preStart = '' systemd.services.forgejo = {
requires = [ "tailscaled.service" ];
preStart = ''
auth="${lib.getExe config.services.forgejo.package} admin auth" auth="${lib.getExe config.services.forgejo.package} admin auth"
echo "Trying to find existing sso configuration for Authelia"... echo "Trying to find existing sso configuration for Authelia"...
@ -91,6 +94,7 @@ in
--auto-discover-url https://auth.escapeangle.com/.well-known/openid-configuration --auto-discover-url https://auth.escapeangle.com/.well-known/openid-configuration
fi fi
''; '';
};
services.nginx.virtualHosts."git.escapeangle.com" = { services.nginx.virtualHosts."git.escapeangle.com" = {
forceSSL = true; forceSSL = true;