mirror of
https://github.com/nix-community/home-manager
synced 2024-11-05 18:59:44 +01:00
email: add support for JMAP
Co-authored-by: Eliza Velasquez <4576666+elizagamedev@users.noreply.github.com>
(cherry picked from commit 467617947d
)
This commit is contained in:
parent
ac2287df5a
commit
40ec43d367
1 changed files with 48 additions and 2 deletions
|
@ -123,6 +123,38 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
jmapModule = types.submodule {
|
||||
options = {
|
||||
host = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "jmap.example.org";
|
||||
description = ''
|
||||
Hostname of JMAP server.
|
||||
</para><para>
|
||||
If both this option and <xref
|
||||
linkend="opt-accounts.email.accounts._name_.jmap.sessionUrl"/> are specified,
|
||||
<code>host</code> is preferred by applications when establishing a
|
||||
session.
|
||||
'';
|
||||
};
|
||||
|
||||
sessionUrl = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "https://jmap.example.org:443/.well-known/jmap";
|
||||
description = ''
|
||||
URL for the JMAP Session resource.
|
||||
</para><para>
|
||||
If both this option and <xref
|
||||
linkend="opt-accounts.email.accounts._name_.jmap.host"/> are specified,
|
||||
<code>host</code> is preferred by applications when establishing a
|
||||
session.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
smtpModule = types.submodule {
|
||||
options = {
|
||||
host = mkOption {
|
||||
|
@ -205,7 +237,7 @@ let
|
|||
indicate the nature of the provider.
|
||||
</para><para>
|
||||
When this indicates a specific provider then, for example,
|
||||
the IMAP and SMTP server configuration may be set
|
||||
the IMAP, SMTP, and JMAP server configuration may be set
|
||||
automatically.
|
||||
'';
|
||||
};
|
||||
|
@ -234,7 +266,7 @@ let
|
|||
default = null;
|
||||
description = ''
|
||||
The server username of this account. This will be used as
|
||||
the SMTP and IMAP user name.
|
||||
the SMTP, IMAP, and JMAP user name.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -299,6 +331,14 @@ let
|
|||
'';
|
||||
};
|
||||
|
||||
jmap = mkOption {
|
||||
type = types.nullOr jmapModule;
|
||||
default = null;
|
||||
description = ''
|
||||
The JMAP configuration to use for this account.
|
||||
'';
|
||||
};
|
||||
|
||||
signature = mkOption {
|
||||
type = signatureModule;
|
||||
default = { };
|
||||
|
@ -343,10 +383,16 @@ let
|
|||
host = "smtp.fastmail.com";
|
||||
port = if config.smtp.tls.useStartTls then 587 else 465;
|
||||
};
|
||||
|
||||
imap = {
|
||||
host = "imap.fastmail.com";
|
||||
port = 993;
|
||||
};
|
||||
|
||||
jmap = {
|
||||
host = "fastmail.com";
|
||||
sessionUrl = "https://jmap.fastmail.com/.well-known/jmap";
|
||||
};
|
||||
})
|
||||
(mkIf (config.flavor == "gmail.com") {
|
||||
userName = mkDefault config.address;
|
||||
|
|
Loading…
Reference in a new issue