Using D1Client.layer Lazily with SqliteDrizzleLayer in Effect Typescript

Hey team, I am trying to lazily use D1Client.layer to provide it to SqliteDrizzleLayer (lazily, because calling the db creation fn from Nuxt fails on initial eval)

It works thunking it with a function plainly, but I would like to be able to provide a Layer to services using Effect.Service instead of providing it later on inside a closure.
Was this page helpful?