Given a commutative ring $k$ and a commutative $k$-algebra $A$, we know that the Kähler differential $\Omega_{A/k}^1$ could be described through machineries of tangent categories (see, for example, the nLab page), which could be adapted to $\infty$-categorical settings: there is a rich theory of the cotangent complex formalism in Lurie's Higher Algebra, section 7.3.
My question is that, whether we have an analogue for connections. Given a commutative ring $k$, a commutative $k$-algebra $A$ and a right $A$-module $M$, we define a connection $\nabla$ to be a $k$-linear map $M\to M\otimes_A\Omega_{A/k}^1$ satisfying the Leibniz rule: $\nabla(ma)=(\nabla m)a+m\otimes da$ for $m\in M$ and $a\in A$. I wonder whether we can also describe this through category theory and imagine a link between this and the deformation theory, so that we can generalize the connection into $\infty$-categorical setting?
EDIT: Following Jason Starr's comment, we can find a description of connections in Illusie's Complexe Cotangent et Déformations, Remarque 2.3.7.5: A connection $\nabla\colon M\to M\otimes_A\Omega_{A/k}^1$ one-to-one corresponds to a splitting $A$-linear map $M\to M\otimes_AP_{A/k}^1$ of the short exact sequence $$0\to M\otimes_A\Omega_{A/k}^1\to M\otimes_AP_{A/k}^1\to M\to0$$ where $P_{A/k}^1=A\oplus\Omega_{A/k}^1$ is the trivial square-zero extension of $A$ with respect to $\Omega_{A/k}^1$ also endowed with a $A$-algebra structure by $A\to P_{A/k}^1,a\mapsto a\oplus da$. This could be naturally generalized to the $\infty$-categorical setting.