If $\Omega$ is closed subset $\mathbb{R}$, then the distance function $$f\colon \mathbb{R}\rightarrow\mathbb{R}, \,\,\,\, x\mapsto d(\Omega,x),$$ is certainly a continuous function. An interesting property of this function is that, the points where $f$ vanishes is precisely the closed set $\Omega$. However, this function is not necessarily differentiable: when $I=\{0\}$, then $f(x)=|x|$, which is not differentiable at $0$.
My question is, can we find other non-closed nice sets (like open sets, or some others) $\Omega$, for which $f$ above will become differentiable function on $\mathbb{R}$? Can we characterize such sets?
(The obvious examples would be dense subsets of $\mathbb{R}$, for which $f$ will be constant function $0$.)