add template simple-nixos-mailserver config

This commit is contained in:
Emile Clark-Boman 2025-07-29 14:12:26 +10:00
parent bad1cbbe8c
commit 230af2eca4

View file

@ -0,0 +1,39 @@
{
config,
pkgs,
...
}: {
imports = [
(builtins.fetchTarball {
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-25.05/nixos-mailserver-nixos-25.05.tar.gz";
# release="nixos-25.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack
sha256 = "0000000000000000000000000000000000000000000000000000";
})
];
# simple-nixos-mailserver
# DOCS: https://nixos-mailserver.readthedocs.io/en/latest
mailserver = {
enable = true;
stateVersion = 3;
# Manually open the firewall instead
openFirewall = false;
virusScanning = false; # expensive memory usage
fqdn = "mail.imbored.dev";
domains = ["imbored.dev"];
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"me@imbored.dev" = {
hashedPasswordFile = "/a/file/containing/a/hashed/password";
aliases = ["emile@imbored.dev"];
};
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = "acme-nginx";
};
}