diff --git a/configuration.nix b/configuration.nix index 3d8c253..f3a34d1 100755 --- a/configuration.nix +++ b/configuration.nix @@ -4,6 +4,7 @@ ./services/forgejo.nix ./services/vaultwarden.nix ./services/jellyfin.nix + ./services/mailserver.nix ./services/misc.nix ./modules/git.nix diff --git a/services/mailserver.nix b/services/mailserver.nix new file mode 100644 index 0000000..4c08215 --- /dev/null +++ b/services/mailserver.nix @@ -0,0 +1,30 @@ +{fetchFromGitLab, ...}: +{ + imports = [ + (fetchFromGitLab { + owner = "simple-nixos-webserver"; + repo = "nixos-mailserver"; + tag = "v2.3.0"; + hash = ""; # TODO: Fill this hash + }) + ]; + + mailserver = { + enable = true; + fqdn = "mail.spoodythe.one"; + domains = [ "spoodythe.one" ]; + + # A list of all login accounts. To create the password hashes, use + # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' + loginAccounts = { + "spoody@spoodythe.one" = { + hashedPassword = "$2b$05$sTD8VXUF76uu1LOThuOSTOC8iCe2w4jgwExwpP.cnN7UOa.YEO9G2"; + aliases = ["admin@spoodythe.one"]; + }; + }; + + # Use Let's Encrypt certificates. Note that this needs to set up a stripped + # down nginx and opens port 80. + certificateScheme = "acme-nginx"; + }; +}