I have configured openvpn to run on start up. Everything is working fine until I hibernate. After I restore from hibernation, I no longer have an Internet connection. I find that if I restart openvpn, I get a connection again.
What is happening and what is a solution?
Second question: Is there a way to store my username and password credentials in a non-world-readable way?
I don’t know exactly, maybe a week or two. You can try and set it to false in your configuration, to verify it’s available in your nixpkgs channel. If it’s not, then you should update. If it is available, and not working, then we should debug it. I haven’t tested it with hibernation, but it definitely work for suspend to RAM.