You can define the axes whichever direction you want as long as you are consistent. You are correct that the first form has the axis positive downward, which makes $g$ be positive and the velocity positive. If you define the axis as positive upward and take $g$ to be a positive number the equation should be $$m\frac {dv}{dt}=-mg-kv$$ because the change in velocity is opposite to the velocity. You can then compue terminal velocity by setting the derivative to zero, getting $$v=-\frac {mg}k$$ This is negative as it should be because the object is moving downward.