An identity in Ring of characteristic $p$ prime Is it true that in a ring of prime characteristic $p$ results that
$(x-1)^{p-1}=1+x+x^2+...+x^{p-1}$ ?
If this is not true in general, the assumption that $x$ is a nilpotent element (let's say $x^{p^n}=0$) make it works?

The identity does indeed hold in general.  One way to see this is from the binomial coefficient identity
$$\binom{p-1}{n}\equiv (-1)^n\pmod p$$
To see that this identity holds, notice that
$$\binom{p-1}{n}=\frac{(p-1)(p-2)\ldots(p-n)}{1\cdot2\cdot\ldots\cdot n}\equiv\frac{-1\cdot-2\cdot\ldots\cdot-n}{1\cdot2\cdot\ldots\cdot n}\pmod{p}$$
