IIR filter design in digital domain using the magnitude squared
To solve the case that you mentioned...

You have 2 variables to determine, so you need two relationships to resolve the two variables.  I'm going to use $k$ and $a$ as the variables to make this easy to type up.

$$H(z) = k\frac{1 + z^-1}{1-az^-1}$$

Start by considering the passband gain.  Use $f = 0$ for this.  Assume you want unity gain at $f_0=0$.  

Assume:  $H(f_0) = 1, f_0 = 0$

Substitute $e^{i2\pi f/f_s}$ for $z$, $f_s$ is your sampling rate, set $f = 0$ and solve for $k$ to satisfy $H\left(f_0\right) = 1$.

From this you get $k = \frac{(1-a)}{2}$

Now work on the gain squared at your desired corner frequency ($f_c$) to determine $a$.

$H(f_c) = -3\textrm{ dB}$ (magnitude squared will be $-6\textrm{ dB}$ as you've stated)

We'll work with the magnitude squared at $f_c$ and set the gain to $1/2$ ($-6\textrm{ dB}$).

$\lvert H\left(f_c\right)\rvert^2 = \frac{1}{2}$

This time substitute $e^{i2\pi fc/f_s}$ for $z$.

To simplify the arithmatic you can solve this equation:

$$
\left(\frac{\lvert H(f_0)\rvert}{\lvert H(f_c)\rvert}\right)^2 = 2
$$

This eliminates the factor $k$.

You will end up with a quadradic relationship in $a$.  Solving for $a$ yields:

$$
a = \frac {1 - \sqrt{1-\cos^2\left(2\pi\frac{f_c}{f_s}\right)}} {\cos\left(2\pi\frac{f_c}{f_s}\right) }= \frac {1 - \sin\left(2\pi\frac{f_c}{f_s}\right)} {\cos\left(2\pi\frac{f_c}{f_s}\right) }
$$