diff options
author | stuebinm | 2022-04-04 17:21:50 +0200 |
---|---|---|
committer | stuebinm | 2022-04-04 19:56:46 +0200 |
commit | afcaf310b923d55e41d6120d1ccaade136e66691 (patch) | |
tree | 2c82d30c807b5b09f9527550ef490cc6de8db0be /flora/services/mail.nix | |
parent | a68b67e186fa189f592476d287540445568d1822 (diff) |
flora: add a simple mailserver setup
mostly to get a working sendmail and also play around with stuff
Diffstat (limited to 'flora/services/mail.nix')
-rw-r--r-- | flora/services/mail.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/flora/services/mail.nix b/flora/services/mail.nix new file mode 100644 index 0000000..d41f0e8 --- /dev/null +++ b/flora/services/mail.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, inputs, ... }: + +{ + imports = [ inputs.simple-nixos-mailserver.nixosModule ]; + + + + mailserver = { + enable = true; + fqdn = "mail.stuebinm.eu"; + domains = [ "stuebinm.eu" ]; + + # A list of all login accounts. To create the password hashes, use + # nix run nixpkgs.apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2 + loginAccounts = { + "hello@stuebinm.eu" = { + hashedPasswordFile = "/var/mailstate/hello-password"; + aliases = ["postmaster@stuebinm.eu" "abuse@stuebinm.eu"]; + }; + }; + + # Use Let's Encrypt certificates. Note that this needs to set up a stripped + # down nginx and opens port 80. + certificateScheme = 3; + }; +} |