{ 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"; }; }