40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
exDomain = (import ./ex-domain.nix) lib;
|
|
in {
|
|
imports = [
|
|
(builtins.fetchTarball {
|
|
# Pick a commit from the branch you are interested in
|
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/0c1801b48995ec6909e040abedaa56a64f0db430/nixos-mailserver-0c1801b48995ec6909e040abedaa56a64f0db430.tar.gz";
|
|
# And set its hash
|
|
sha256 = "";
|
|
})
|
|
];
|
|
|
|
mailserver = {
|
|
enable = true;
|
|
fqdn = "mail.b12f.io";
|
|
domains = ["b12f.io" exDomain];
|
|
|
|
# A list of all login accounts. To create the password hashes, use
|
|
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
|
loginAccounts."mail@b12f.io" = {
|
|
hashedPassword = "$2b$05$Ak1YLaRtdBI6h0uwSIzpKuF3v9JIxRBwODrARTLSlPM8guYI1rNmC";
|
|
aliases = ["@example.com"];
|
|
};
|
|
|
|
loginAccounts."mail@${exDomain}" = {
|
|
hashedPassword = "$2b$05$wWs55JDK1.LiPqKPF3egfu/3ocEQGihD7hkvLqvVsAzmKSzL0DGdi";
|
|
aliases = [("@" + exDomain)];
|
|
};
|
|
|
|
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
|
|
# down nginx and opens port 80.
|
|
certificateScheme = "acme";
|
|
};
|
|
}
|