2023-11-24 15:35:17 +01:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
outputs,
|
2023-11-25 00:47:00 +01:00
|
|
|
lib,
|
2023-11-24 15:35:17 +01:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
(builtins.fetchTarball {
|
|
|
|
# Pick a release version you are interested in and set its hash, e.g.
|
|
|
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.3.0/nixos-mailserver-v2.3.0.tar.gz";
|
|
|
|
# To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command:
|
|
|
|
# release="nixos-23.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack
|
|
|
|
sha256 = "0lpz08qviccvpfws2nm83n7m2r8add2wvfg9bljx9yxx8107r919";
|
|
|
|
})
|
|
|
|
];
|
2023-11-24 15:46:14 +01:00
|
|
|
|
2023-11-24 15:35:17 +01:00
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
|
|
|
fqdn = "mail.gladtherescake.eu";
|
|
|
|
domains = ["nextcloud.gladtherescake.eu"];
|
2023-11-25 00:52:26 +01:00
|
|
|
enableImapSsl = true;
|
2023-11-24 15:35:17 +01:00
|
|
|
|
|
|
|
loginAccounts = {
|
|
|
|
"no-reply@nextcloud.gladtherescake.eu" = {
|
|
|
|
hashedPasswordFile = config.sops.secrets."mailpass".path;
|
|
|
|
};
|
|
|
|
};
|
2023-11-25 00:51:58 +01:00
|
|
|
rejectRecipients = ["no-reply@nextcloud.gladtherescake.eu"];
|
2023-11-25 00:47:00 +01:00
|
|
|
certificateScheme = "acme-nginx";
|
2023-11-24 15:35:17 +01:00
|
|
|
};
|
2023-11-25 00:47:00 +01:00
|
|
|
security.acme.acceptTerms = true;
|
|
|
|
security.acme.defaults.email = "letsencryp@gladtherescake.eu";
|
2023-11-24 15:35:17 +01:00
|
|
|
}
|