Commit Graph

22 Commits

Author SHA1 Message Date
Martin Weinelt 33ba1ff52b Switch to NixOS ACME module for certificate management
Drop most of the existing certificate handling, because we're effectively
duplicating functionality that NixOS offers for free with better
design, testing and maintainance than what we could provide downstream.

The remaining two options are to reference an
existing `security.acme.certs` configuration through
`mailserver.x509.useACMEHost` or to provide existing key material via
`mailserver.x509.certificateFile` and `mailserver.x509.privateKeyFile`.

Support for automatic creation of self-signed certificates has been
removed, because it is undesirable in public mail setups.

The updated setup guide now displays the recommended configuration that
relies on the NixOS ACME module, but requires further customization to
select a suitable challenge.

Co-Authored-By: Emily <git@emilylange.de>
2025-12-19 02:36:28 +01:00
Martin Weinelt b76a547bec treewide: reformat with nixfmt 1.0.0 2025-08-02 02:19:15 +02:00
Martin Weinelt a2152f9807 treewide: remove overly broad with cfg
Makes it really hard to follow references and we were being explicit in
most places already anyway.
2025-06-15 05:39:20 +02:00
Martin Weinelt 1a7f3d718c treewide: reformat with nixfmt-rfc-style 2025-06-15 03:39:44 +02:00
Naïm Favier a948c49ca7 Allow using existing ACME certificates
Add a certificate scheme for using an existing ACME certificate without
setting up Nginx.

Also use names instead of magic numbers for certificate schemes.
2023-05-24 21:10:02 +00:00
Simon Žlender 0c4b9a8985 Make opening ports in the firewall optional 2021-02-09 21:09:36 +01:00
Milan Pässler cc526a2700 add full support for tls wrapped mode 2020-10-05 20:54:46 +02:00
Robin Raymond aca43875dc update copywright 2018-01-29 10:34:27 +01:00
Andrey Golovizin 30e4f136fd Add enableManageSieve option to open port 4190 2018-01-07 14:05:12 +01:00
Robin Raymond 160f3cbc9b open port 80 when using LE certs. fixes #42 2017-11-26 07:59:31 +01:00
Ruben Maher 7b3e33c49c mail-server/networking.nix: make use of use lib.optional 2017-11-13 20:10:33 +10:30
Ruben Maher 5047c2982f default.nix: add options to open ports 993 (IMAPS) and 995 (POP3S)
Dovecot is already configured to serve IMAPS on port 993 and POP3S on port 995.
2017-11-13 20:10:30 +10:30
Robin Raymond 12f16b2239 remove hostname from config, it breaks tests 2017-09-21 10:59:56 +02:00
Robin Raymond 1e0c203bf8 Merge branch 'module-rewrite' 2017-09-03 15:31:37 +02:00
Robin Raymond 9ac491f87d networking to module 2017-09-02 14:58:33 +02:00
Robin Raymond ebb2a5caf7 camelCase 2 2017-09-02 13:29:49 +02:00
Robin Raymond b5fccc7e39 camelCase 2017-09-02 13:23:37 +02:00
Danylo Hlynskyi c6e2de7180 don't enable firewall by default
It is default ON in NixOS and will conflict with `firewall.enable = false`, which some user may intentionally set.
In my opinion it is very high-level option to be set automatically.

Also, people who really don't want firewall, just do `lib.mkForce false` and won't even notice that this module requires it.
2017-08-31 14:42:14 +03:00
Silvan Mosberger 692a677194 make configuration a nixos module 2017-08-30 15:09:38 +02:00
Robin Raymond ecd73f4e1c firewall respects settings 2017-08-13 14:20:02 +02:00
Robin Raymond f3f30f2f24 add documentation 2017-08-12 16:41:43 +02:00
Robin Raymond 60574841c6 restructuring; now works with 17.03/17.09-pre
I had to remove some of the features, they need to be slowely added in
again.
2017-08-12 11:27:19 +02:00