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.";
|
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 {
|
realName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "Jane Doe";
|
example = "Jane Doe";
|
||||||
|
|
|
@ -22,6 +22,9 @@ let
|
||||||
sendmail_command =
|
sendmail_command =
|
||||||
optionalString (alot.sendMailCommand != null) alot.sendMailCommand;
|
optionalString (alot.sendMailCommand != null) alot.sendMailCommand;
|
||||||
}
|
}
|
||||||
|
// optionalAttrs (aliases != []) {
|
||||||
|
aliases = concatStringsSep "," aliases;
|
||||||
|
}
|
||||||
// optionalAttrs (gpg != null) {
|
// optionalAttrs (gpg != null) {
|
||||||
gpg_key = gpg.key;
|
gpg_key = gpg.key;
|
||||||
encrypt_by_default = if gpg.encryptByDefault then "all" else "none";
|
encrypt_by_default = if gpg.encryptByDefault then "all" else "none";
|
||||||
|
|
|
@ -42,7 +42,9 @@ let
|
||||||
in {
|
in {
|
||||||
name = catAttrs "realName" primary;
|
name = catAttrs "realName" primary;
|
||||||
primary_email = catAttrs "address" primary;
|
primary_email = catAttrs "address" primary;
|
||||||
other_email = catAttrs "address" secondaries;
|
other_email = catAttrs "aliases" primary
|
||||||
|
++ catAttrs "address" secondaries
|
||||||
|
++ catAttrs "aliases" secondaries;
|
||||||
};
|
};
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
|
|
Loading…
Reference in a new issue