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

38 lines
1.2 KiB
Nix
Raw Normal View History

2023-11-24 15:35:17 +01:00
{
inputs,
outputs,
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
users.users = {
virtualMail = {
isSystemUser = true;
2023-11-24 15:47:08 +01:00
isNormalUser = false;
2023-11-24 15:46:14 +01:00
group = "virtualMail";
};
};
2023-11-24 15:35:17 +01:00
mailserver = {
enable = true;
fqdn = "mail.gladtherescake.eu";
domains = ["nextcloud.gladtherescake.eu"];
loginAccounts = {
"no-reply@nextcloud.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
aliases = ["postmaster@nextcloud.gladtherescake.eu" "abuse@nextcloud.gladtherescake.eu" "security@nextcloud.gladtherescake.eu"];
};
};
};
}