home: mail: accounts: use 'mkMailAccount'

This commit is contained in:
Bruno BELANYI 2021-10-12 17:54:54 +02:00
parent 97fa58c220
commit 8d8904ccef

View file

@ -2,16 +2,16 @@
let
cfg = config.my.home.mail;
mkAddress = address: domain: "${address}@${domain}";
inherit (lib.my) mkMailAddress;
mkConfig = { domain, address, passName, aliases ? [ ], primary ? false }: {
realName = lib.mkDefault "Bruno BELANYI";
userName = lib.mkDefault (mkAddress address domain);
userName = lib.mkDefault (mkMailAddress address domain);
passwordCommand =
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
address = mkAddress address domain;
aliases = builtins.map (lib.flip mkAddress domain) aliases;
address = mkMailAddress address domain;
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;
inherit primary;