Under what circumstances are the relative Kahler differentials a flat module? First let us recall one construction of the relative Kahler differentials. Let $k$ be a ring and $R$ a $k$-algebra. The relative Kahler differentials $\Omega_{R/k}$ are the $R$-module satisfying the following universal property:

For any $R$-module $M$ and $k$-linear derivation $\delta:R\to M$ (an $R$-module homomorphism satisfying the Leibniz rule), there exists a universal derivation $d:R\to\Omega_{R/k}$ and a unique $R$-module homomorphism $\varphi:\Omega_{R/k}\to M$ such that $\varphi\circ d=\delta$.

You can use this universal property, along with some direct constructions and short exact sequences, to compute specific examples. Explicitly, suppose $R=k[x_{1},\ldots,x_{n}]/(f_{1},\ldots,f_{s})$ is a $k$-algebra of finite type. Then one can show that $\Omega_{R/k}=(Rdx_{1}\oplus\cdots\oplus Rdx_{n})/(df_{1},\ldots,df_{s})$, and $d:R\to\Omega_{R/k}$ is given by $f\mapsto df$. Namely, the Kahler differentials are the cokernel of the Jacobian matrix $\begin{bmatrix}\frac{\partial f_{i}}{\partial x_{j}}\end{bmatrix}:R^{s}\to R^{n}$.
I'm curious as to what hypotheses are known under which $\Omega_{R/k}$ is a flat $R$-module. For example, by our calculation above, $\Omega_{R/k}$ is free if $R$ is a polynomial $k$-algebra, and by Proposition 3.9 of these linked notes by Akhil Mathew, $\Omega_{R/k}$ is projective of rank $\dim R$ if and only if $R$ is regular; hence, $\Omega_{R/k}$ is flat in both of these circumstances.
My question: What else can be said if we only need $\Omega_{R/k}$ to be a flat $R$-module? Even better, are there necessary and sufficient hypotheses on $R$ that guarantee flatness of $\Omega_{R/k}$, like is the case for projectiveness?
 A: If $ R $ is a finitely generated $ k $-algebra, hence Noetherian, then $ M = \Omega_{R/k} $ is a finitely presented $ R $-module. If in addition, if you assume that this is flat, then this gives you a flat coherent sheaf on $ \operatorname{spec} R $. It is a standard fact then, that this sheaf is now actually locally free. Let me try to recall the outline, but I'll add more details if necessary.
(1) Let $ P $ be a prime of $ R$. We can take elements $ \{ x_i \}_{i=1}^{d} $ of $ M $ which give a basis of $ M \otimes_R k(P) $. Nakayama's lemma and the fact that the sheaf is coherent imply that there is an $ f \notin P $ such that the above elements induce a surjection $$ R_f^{ \oplus d }\rightarrow M_f \rightarrow 0 $$
(2) Call the kernel above $ K $. Then $ K $ is a finitely generated $ R_f $-module by general nonsense (snake lemma).
(3) Because $ M_f $ is a flat $ R_f $-module, snake lemma again implies $$ 0 \rightarrow K \otimes_{R_f} k(P) \rightarrow k(P)^d \rightarrow M_f \otimes_{R_f} k(P) \rightarrow 0 $$ is exact. The surjection above has no kernel because $ \{ x_i \} $ was a basis. That is, $ K \otimes_{R_f} k(P) = 0 $.
(4) By exactly step (1) applied to $ K $ this time, there is a $ g \notin P $ such that $ K_g = 0 $.
So $ M_{fg} $ becomes locally free over $ R_{fg} $.
This shows that if you assume $ \Omega_{R/k} $ flat, $ R $ must be regular.
I don't know a reference but I have not seen this in Hartshorne. Maybe it's there in the book of Gortz and Wedhorn.
