From 81413726b7857400fe0422b45e2c476ae63e07b7 Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Tue, 4 Nov 2025 09:26:52 +0000 Subject: [PATCH] feat(kavita): wait for OIDC to start Change-Id: wznllvxvuqmzyopttxmlyzrsnlvzxpoo Previously we were running in to a race condition where OIDC wouldn't start early enough, so kavita would load without it. As we have turned off passwords entirely, this would cause the instance to be unusable I've copied this wait code directly from our oauth2-proxy stuff, which has the same problem. We should consider if there's a better way to do this... --- packetmix/systems/teal/kavita.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packetmix/systems/teal/kavita.nix b/packetmix/systems/teal/kavita.nix index 06dcb585..20dfd482 100644 --- a/packetmix/systems/teal/kavita.nix +++ b/packetmix/systems/teal/kavita.nix @@ -39,6 +39,8 @@ ${pkgs.replace-secret}/bin/replace-secret '@OIDC_SECRET@' \ ''${CREDENTIALS_DIRECTORY}/OIDC_SECRET \ '${config.services.kavita.dataDir}/config/appsettings.json' + + while [[ \"$(${pkgs.curl}/bin/curl -s -L https://idm.freshly.space/status)\" != \"true\" ]]; do sleep 5; done ''; serviceConfig.LoadCredential = [ "OIDC_SECRET:/secrets/kavita/OIDC_SECRET" ]; }; -- 2.43.0