From 00e4a33cd1af97552fba854233609f866dbc2608 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 26 Jun 2020 13:43:41 +0200 Subject: [PATCH] mbsync: create groups configuration attribute This is the end of the configuration that the end-user will use. They will specify an attribute set that contains the name for the group, so they can say `accounts.email.accounts..groups.` to access the configuration for the group with the name ``. --- modules/programs/mbsync-accounts.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/programs/mbsync-accounts.nix b/modules/programs/mbsync-accounts.nix index 23442b35d..11bc8e236 100644 --- a/modules/programs/mbsync-accounts.nix +++ b/modules/programs/mbsync-accounts.nix @@ -126,6 +126,20 @@ in { ''; }; + groups = mkOption { + type = types.attrsOf (types.submodule perAccountGroups); + default = { }; + description = '' + Some email providers (Gmail) have a different directory hierarchy for + synchronized email messages. Namely, when using mbsync without specifying + a set of channels into a group, all synchronized directories end up beneath + the [Gmail]/ directory. + + This option allows you to specify a group, and subsequently channels that + will allow you to sync your mail into an arbitrary hierarchy. + ''; + }; + extraConfig.channel = mkOption { type = extraConfigType; default = { };