email: add facility for email aliases
Also update the notmuch and alot modules to include support for email aliases.
This commit is contained in:
parent
30a16e3a87
commit
a6f0fa90f7
|
@ -207,6 +207,13 @@ let
|
|||
description = "The email address of this account.";
|
||||
};
|
||||
|
||||
aliases = mkOption {
|
||||
type = types.listOf (types.strMatching ".*@.*");
|
||||
default = [];
|
||||
example = [ "webmaster@example.org" "admin@example.org" ];
|
||||
description = "Alternative email addresses of this account.";
|
||||
};
|
||||
|
||||
realName = mkOption {
|
||||
type = types.str;
|
||||
example = "Jane Doe";
|
||||
|
|
|
@ -22,6 +22,9 @@ let
|
|||
sendmail_command =
|
||||
optionalString (alot.sendMailCommand != null) alot.sendMailCommand;
|
||||
}
|
||||
// optionalAttrs (aliases != []) {
|
||||
aliases = concatStringsSep "," aliases;
|
||||
}
|
||||
// optionalAttrs (gpg != null) {
|
||||
gpg_key = gpg.key;
|
||||
encrypt_by_default = if gpg.encryptByDefault then "all" else "none";
|
||||
|
|
|
@ -42,7 +42,9 @@ let
|
|||
in {
|
||||
name = catAttrs "realName" primary;
|
||||
primary_email = catAttrs "address" primary;
|
||||
other_email = catAttrs "address" secondaries;
|
||||
other_email = catAttrs "aliases" primary
|
||||
++ catAttrs "address" secondaries
|
||||
++ catAttrs "aliases" secondaries;
|
||||
};
|
||||
|
||||
search = {
|
||||
|
|
Loading…
Reference in a new issue