NixOS-Config/nixos/queen/mail-server.nix

36 lines
1.2 KiB
Nix
Raw Normal View History

2023-11-24 15:35:17 +01:00
{
inputs,
outputs,
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;
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;
};
};
rejectRecipients = ["no-reply@nextcloud.gladtherescake.eu"];
certificateScheme = "acme-nginx";
2023-11-24 15:35:17 +01:00
};
security.acme.acceptTerms = true;
security.acme.defaults.email = "letsencryp@gladtherescake.eu";
2023-11-24 15:35:17 +01:00
}