mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
isync/mbsync: update module for 1.5.0 changes (#5918)
* mbsync: Add NEWS entry about isync 1.5.0 changes * mbsync: Place config file in $XDG_CONFIG_HOME mbsync 1.5.0 supports placing isync's configuration file in $XDG_CONFIG_HOME/isyncrc [1]. [1] https://sourceforge.net/projects/isync/files/isync/1.5.0/ * mbsync: Replace SSLType with TLSType mbsync 1.5.0 replaced the name of the configuration option [1]. Also update SSLVersions to TLSVersions for the same reason. Inform the user if the option was renamed. [1] https://sourceforge.net/projects/isync/files/isync/1.5.0/ * mbsync: Replace SSLVersions with TLSVerisons * mbsync: Update extraConfig.account example with SSL->TLS changes
This commit is contained in:
parent
d00c6f6d0a
commit
f63c15c137
5 changed files with 39 additions and 8 deletions
|
@ -1861,6 +1861,35 @@ in {
|
||||||
Some plugins require this to be set to 'false' to function correctly.
|
Some plugins require this to be set to 'false' to function correctly.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-12-08T17:22:13+00:00";
|
||||||
|
condition = let
|
||||||
|
usingMbsync = any (a: a.mbsync.enable)
|
||||||
|
(attrValues config.accounts.email.accounts);
|
||||||
|
in usingMbsync;
|
||||||
|
message = ''
|
||||||
|
isync/mbsync 1.5.0 has changed several things.
|
||||||
|
|
||||||
|
isync gained support for using $XDG_CONFIG_HOME, and now places
|
||||||
|
its config file in '$XDG_CONFIG_HOME/isyncrc'.
|
||||||
|
|
||||||
|
isync changed the configuration options SSLType and SSLVersion to
|
||||||
|
TLSType and TLSVersion respectively.
|
||||||
|
|
||||||
|
All instances of
|
||||||
|
'accounts.email.accounts.<account-name>.mbsync.extraConfig.account'
|
||||||
|
that use 'SSLType' or 'SSLVersion' should be replaced with 'TLSType'
|
||||||
|
or 'TLSVersion', respectively.
|
||||||
|
|
||||||
|
TLSType options are unchanged.
|
||||||
|
|
||||||
|
TLSVersions has a new syntax, requiring a change to the Nix syntax.
|
||||||
|
Old Syntax: SSLVersions = [ "TLSv1.3" "TLSv1.2" ];
|
||||||
|
New Syntax: TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
|
||||||
|
NOTE: The minus symbol means to NOT use that particular TLS version.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,6 +225,8 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
TLSType = "IMAP";
|
||||||
|
TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
|
||||||
PipelineDepth = 10;
|
PipelineDepth = 10;
|
||||||
Timeout = 60;
|
Timeout = 60;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ let
|
||||||
|
|
||||||
genTlsConfig = tls:
|
genTlsConfig = tls:
|
||||||
{
|
{
|
||||||
SSLType = if !tls.enable then
|
TLSType = if !tls.enable then
|
||||||
"None"
|
"None"
|
||||||
else if tls.useStartTls then
|
else if tls.useStartTls then
|
||||||
"STARTTLS"
|
"STARTTLS"
|
||||||
|
@ -267,7 +267,7 @@ in {
|
||||||
|
|
||||||
programs.notmuch.new.ignore = [ ".uidvalidity" ".mbsyncstate" ];
|
programs.notmuch.new.ignore = [ ".uidvalidity" ".mbsyncstate" ];
|
||||||
|
|
||||||
home.file.".mbsyncrc".text = let
|
xdg.configFile."isyncrc".text = let
|
||||||
accountsConfig = map genAccountConfig mbsyncAccounts;
|
accountsConfig = map genAccountConfig mbsyncAccounts;
|
||||||
# Only generate this kind of Group configuration if there are ANY accounts
|
# Only generate this kind of Group configuration if there are ANY accounts
|
||||||
# that do NOT have a per-account groups/channels option(s) specified.
|
# that do NOT have a per-account groups/channels option(s) specified.
|
||||||
|
|
|
@ -4,7 +4,7 @@ IMAPAccount hm-account
|
||||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||||
Host imap.example.org
|
Host imap.example.org
|
||||||
PassCmd "password-command 2"
|
PassCmd "password-command 2"
|
||||||
SSLType IMAPS
|
TLSType IMAPS
|
||||||
User home.manager.jr
|
User home.manager.jr
|
||||||
|
|
||||||
IMAPStore hm-account-remote
|
IMAPStore hm-account-remote
|
||||||
|
@ -56,8 +56,8 @@ IMAPAccount hm@example.com
|
||||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||||
Host imap.example.com
|
Host imap.example.com
|
||||||
PassCmd password-command
|
PassCmd password-command
|
||||||
SSLType IMAPS
|
TLSType IMAPS
|
||||||
SSLVersions TLSv1.3 TLSv1.2
|
TLSVersions +1.3 +1.2 -1.1
|
||||||
User home.manager
|
User home.manager
|
||||||
|
|
||||||
IMAPStore hm@example.com-remote
|
IMAPStore hm@example.com-remote
|
||||||
|
|
|
@ -21,7 +21,7 @@ with lib;
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
"hm@example.com".mbsync = {
|
"hm@example.com".mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig.account.SSLVersions = [ "TLSv1.3" "TLSv1.2" ];
|
extraConfig.account.TLSVersions = [ "+1.3" "+1.2" "-1.1" ];
|
||||||
groups.inboxes = {
|
groups.inboxes = {
|
||||||
channels = {
|
channels = {
|
||||||
inbox1 = {
|
inbox1 = {
|
||||||
|
@ -79,8 +79,8 @@ with lib;
|
||||||
test.stubs.isync = { };
|
test.stubs.isync = { };
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.mbsyncrc
|
assertFileExists home-files/.config/isyncrc
|
||||||
assertFileContent home-files/.mbsyncrc ${./mbsync-expected.conf}
|
assertFileContent home-files/.config/isyncrc ${./mbsync-expected.conf}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue