Trouble with passing variable to sed

Here is my code

#!/bin/bash
username=gnowicki
sed '$s/$/ $username/' < sshd_config 1 <> sshd_config

what this is supposed to do is take the name gnowicki and put it at the end of the last line of the sshd_config and it works except not using the variable, if I put the name "gnowicki" where "$variable" is it puts gnowicki at the end of the line correctly but if I put "$username" it will put "$username" in the sshd_config file and I only want what the variable equals.

what do I need to do? :wall:

use " instead of '

sed "$ s/$/ $username/" 

#note: the space after the first $