Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(kavita): wait for OIDC to start

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...

Changed files
+2
packetmix
systems
teal
+2
packetmix/systems/teal/kavita.nix
··· 39 39 ${pkgs.replace-secret}/bin/replace-secret '@OIDC_SECRET@' \ 40 40 ''${CREDENTIALS_DIRECTORY}/OIDC_SECRET \ 41 41 '${config.services.kavita.dataDir}/config/appsettings.json' 42 + 43 + while [[ \"$(${pkgs.curl}/bin/curl -s -L https://idm.freshly.space/status)\" != \"true\" ]]; do sleep 5; done 42 44 ''; 43 45 serviceConfig.LoadCredential = [ "OIDC_SECRET:/secrets/kavita/OIDC_SECRET" ]; 44 46 };