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.
|
2023-11-25 00:58:59 +01:00
|
|
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/24128c3052090311688b09a400aa408ba61c6ee5/nixos-mailserver-A-COMMIT-ID.tar.gz";
|
2023-11-24 15:35:17 +01:00
|
|
|
# To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command:
|
2023-11-25 00:58:59 +01:00
|
|
|
# release="nixos-23.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/24128c3052090311688b09a400aa408ba61c6ee5/nixos-mailserver-A-COMMIT-ID.tar.gz" --unpack
|
|
|
|
sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c";
|
2023-11-24 15:35:17 +01:00
|
|
|
})
|
|
|
|
];
|
2023-11-24 15:46:14 +01:00
|
|
|
|
2023-11-24 15:35:17 +01:00
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
2023-11-25 01:15:34 +01:00
|
|
|
enableImap = true;
|
2023-11-25 01:20:13 +01:00
|
|
|
enableSubmission = true;
|
2023-11-24 15:35:17 +01:00
|
|
|
fqdn = "mail.gladtherescake.eu";
|
2023-11-25 14:09:05 +01:00
|
|
|
domains = ["nextcloud.gladtherescake.eu" "akkoma.gladtherescake.eu"];
|
2023-11-24 15:35:17 +01:00
|
|
|
|
|
|
|
loginAccounts = {
|
|
|
|
"no-reply@nextcloud.gladtherescake.eu" = {
|
|
|
|
hashedPasswordFile = config.sops.secrets."mailpass".path;
|
|
|
|
};
|
2023-11-25 14:14:34 +01:00
|
|
|
"no-reply@akkoma.gladtherescake.eu" = {
|
|
|
|
hashedPasswordFile = config.sops.secrets."mailpass".path;
|
|
|
|
};
|
2023-11-24 15:35:17 +01:00
|
|
|
};
|
2023-11-25 14:14:34 +01:00
|
|
|
rejectRecipients = ["no-reply@nextcloud.gladtherescake.eu" "no-reply@akkoma.gladtherescake.eu"];
|
2023-11-25 00:47:00 +01:00
|
|
|
certificateScheme = "acme-nginx";
|
2023-11-24 15:35:17 +01:00
|
|
|
};
|
|
|
|
}
|