Nginx: Difference between revisions

Extra Config section added
update SSL example to include required firewall and acceptTerms configuration for ACME to work
Line 35: Line 35:
   };
   };
};
};
# Optional: You can configure the email address used with Let's Encrypt.
 
# This way you get renewal reminders (automated by NixOS) as well as expiration emails.
networking.firewall.allowedTCPPorts = [ 80 443 ];
security.acme.certs = {
 
   "blog.example.com".email = "youremail@address.com";
security.acme = {
  # Accept the CA’s terms of service. The default provider is Let’s Encrypt, you can find their ToS at https://letsencrypt.org/repository/.
  acceptTerms = true;
  # Optional: You can configure the email address used with Let's Encrypt.
  # This way you get renewal reminders (automated by NixOS) as well as expiration emails.
   defaults.email = "youremail@address.com";
};
};
</syntaxhighlight>
</syntaxhighlight>