mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
mbsync: extend config type with list of strings
Some configuration options can take space separated strings; for example `SSLVersions` can be configured with multiple allowed versions. SSLVersions TLSv1.3 TLSv1.2 This can now be represented in Home Manager. SSLVersions = [ “TLSv1.3” “TLSv1.2” ]; In implementing this change, it uses oneOf for config type, as it is a cleaner way to represent the union than the nested eithers formulation. Also add SSLVersions to test lists of strings in `account.extraConfig`.
This commit is contained in:
parent
df79df8be1
commit
41790ba656
3 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,8 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
extraConfigType = with lib.types; attrsOf (either (either str int) bool);
|
||||
extraConfigType = with lib.types;
|
||||
attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||
|
||||
perAccountGroups = { name, config, ... }: {
|
||||
options = {
|
||||
|
|
|
@ -57,6 +57,7 @@ CertificateFile /etc/ssl/certs/ca-certificates.crt
|
|||
Host imap.example.com
|
||||
PassCmd password-command
|
||||
SSLType IMAPS
|
||||
SSLVersions TLSv1.3 TLSv1.2
|
||||
User home.manager
|
||||
|
||||
IMAPStore hm@example.com-remote
|
||||
|
|
|
@ -21,6 +21,7 @@ with lib;
|
|||
accounts.email.accounts = {
|
||||
"hm@example.com".mbsync = {
|
||||
enable = true;
|
||||
extraConfig.account.SSLVersions = [ "TLSv1.3" "TLSv1.2" ];
|
||||
groups.inboxes = {
|
||||
channels = {
|
||||
inbox1 = {
|
||||
|
|
Loading…
Reference in a new issue