feat(mail): basic config

This commit is contained in:
Khaïs COLIN 2024-09-02 14:06:24 +02:00
parent cb15994cc6
commit d17dfebff8
2 changed files with 21 additions and 1 deletions

View file

@ -24,8 +24,8 @@ in
./postgresql.nix
(import ./sourcehut.nix { inherit base-domain; })
(import ./paperless.nix { inherit base-domain lib; })
(import ./mailserver.nix { inherit base-domain; })
./userprogs.nix
];

20
mailserver.nix Normal file
View file

@ -0,0 +1,20 @@
{ base-domain, ... }:
let
fqdn = "mail.${base-domain}";
in
{
mailserver = {
enable = true;
inherit fqdn;
domains = [ base-domain ];
loginAccounts = {
"khais.colin@${base-domain}" = {
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
hashedPasswordFile = "/etc/nixos/secrets/mailserver/khais.colin.hashpassword";
};
};
certificateScheme = "acme-nginx";
};
}