How do I setup `nsswitch.conf` for Cygwin?

nsswitch.conf

Step 1

Remove comments and empty lines:

sed -i -r '/^[\s\t]*[#;]/d' nsswitch.conf
sed -i -r '/^\s*$/d' nsswitch.conf

Step 2

Set a custom home directory for Cygwin.