home: mail: accounts: use 'mkMailAccount'
This commit is contained in:
parent
8bf601a6aa
commit
7b6af91642
|
@ -2,16 +2,16 @@
|
||||||
let
|
let
|
||||||
cfg = config.my.home.mail;
|
cfg = config.my.home.mail;
|
||||||
|
|
||||||
mkAddress = address: domain: "${address}@${domain}";
|
inherit (lib.my) mkMailAddress;
|
||||||
|
|
||||||
mkConfig = { domain, address, passName, aliases ? [ ], primary ? false }: {
|
mkConfig = { domain, address, passName, aliases ? [ ], primary ? false }: {
|
||||||
realName = lib.mkDefault "Bruno BELANYI";
|
realName = lib.mkDefault "Bruno BELANYI";
|
||||||
userName = lib.mkDefault (mkAddress address domain);
|
userName = lib.mkDefault (mkMailAddress address domain);
|
||||||
passwordCommand =
|
passwordCommand =
|
||||||
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
|
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
|
||||||
|
|
||||||
address = mkAddress address domain;
|
address = mkMailAddress address domain;
|
||||||
aliases = builtins.map (lib.flip mkAddress domain) aliases;
|
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;
|
||||||
|
|
||||||
inherit primary;
|
inherit primary;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue