Redirect www to non-www in nginx

From DevOps Notebook
server {
    listen 80;
    server_name www.devopsnotebook.com;
    return 301 $scheme://devopsnotebook.com$request_uri;
}