I want to host my domain mydomain.com on a personal server, but my registrar asks me for my nameservers. Would it be possible to create a nameserver ns.mydomain.com and point it to the static IP that my hosting PC has?
In other words is it possible to set the hosting machine as the nameserver also?
Yes. THis is fine to do, as long as you have a name "Server" running on that machine. Another option is to use Amazon Route 53 as your name server. Its pennies per month and more reliable than your own server.