It is a non-homogenous recurrence
$$ f(n) = -\frac{1}{2}f(n-1) + (n-1) \tag{1}$$
with associated homogeneous recurrence
$$ g(n) = -\frac{1}{2}g(n-1) \tag{2} $$
The general solution to $(2)$ is
$$g(n)=C(-\frac{1}{2})^n \tag{3}$$
for constant $C$.
To construct a general solution to $(1)$, we guess a particular solution, call it $p(n)$. Assume $p(n)$ has the same form as the non-homogeneous part of $(1)$, i.e. a polynomial in $n$ of degree one:
$$ p(n) = an+b $$
Then
$$ an+b = -\frac{1}{2}(a(n-1)+b)+(n-1) $$
Equating the coefficients on the linear and constant term we find $a=2/3$ and $b=-4/9$, so
$$ p(n) = \frac{2}{3}n-\frac{4}{9} $$
Thus, the general solution to $(1)$ will have the form
$$ \begin{aligned} f(n) & = g(n) + p(n) \\
& = C(-\frac{1}{2})^n +\frac{2}{3}n-\frac{4}{9} \end{aligned} $$
In order to guarantee $f(0)=1$ you have to set $C=13/9$.