aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/mbsync-accounts.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-10-05 12:06:29 +0000
committerKatharina Fey <kookie@spacekookie.de>2019-10-05 12:42:50 +0000
commit1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (patch)
tree1a9586de593790e236349d5caa0abdff7f3f6856 /home-manager/modules/programs/mbsync-accounts.nix
parent919d4e75699aa4ba456fd2d3d416a0522c9c7294 (diff)
parent8bddc1adab0f7a51476f819fa2197353e8e1d136 (diff)
Add 'home-manager/' from commit '8bddc1adab0f7a51476f819fa2197353e8e1d136'
git-subtree-dir: home-manager git-subtree-mainline: 919d4e75699aa4ba456fd2d3d416a0522c9c7294 git-subtree-split: 8bddc1adab0f7a51476f819fa2197353e8e1d136
Diffstat (limited to 'home-manager/modules/programs/mbsync-accounts.nix')
-rw-r--r--home-manager/modules/programs/mbsync-accounts.nix107
1 files changed, 107 insertions, 0 deletions
diff --git a/home-manager/modules/programs/mbsync-accounts.nix b/home-manager/modules/programs/mbsync-accounts.nix
new file mode 100644
index 00000000000..c586481df4d
--- /dev/null
+++ b/home-manager/modules/programs/mbsync-accounts.nix
@@ -0,0 +1,107 @@
+{ lib, ... }:
+
+with lib;
+
+let
+
+ extraConfigType = with lib.types; attrsOf (either (either str int) bool);
+
+in
+
+{
+ options.mbsync = {
+ enable = mkEnableOption "synchronization using mbsync";
+
+ flatten = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ example = ".";
+ description = ''
+ If set, flattens the hierarchy within the maildir by
+ substituting the canonical hierarchy delimiter
+ <literal>/</literal> with this value.
+ '';
+ };
+
+ create = mkOption {
+ type = types.enum [ "none" "maildir" "imap" "both" ];
+ default = "none";
+ example = "maildir";
+ description = ''
+ Automatically create missing mailboxes within the
+ given mail store.
+ '';
+ };
+
+ remove = mkOption {
+ type = types.enum [ "none" "maildir" "imap" "both" ];
+ default = "none";
+ example = "imap";
+ description = ''
+ Propagate mailbox deletions to the given mail store.
+ '';
+ };
+
+ expunge = mkOption {
+ type = types.enum [ "none" "maildir" "imap" "both" ];
+ default = "none";
+ example = "both";
+ description = ''
+ Permanently remove messages marked for deletion from
+ the given mail store.
+ '';
+ };
+
+ patterns = mkOption {
+ type = types.listOf types.str;
+ default = [ "*" ];
+ description = ''
+ Pattern of mailboxes to synchronize.
+ '';
+ };
+
+ extraConfig.channel = mkOption {
+ type = extraConfigType;
+ default = {};
+ example = literalExample ''
+ {
+ MaxMessages = 10000;
+ MaxSize = "1m";
+ };
+ '';
+ description = ''
+ Per channel extra configuration.
+ '';
+ };
+
+ extraConfig.local = mkOption {
+ type = extraConfigType;
+ default = {};
+ description = ''
+ Local store extra configuration.
+ '';
+ };
+
+ extraConfig.remote = mkOption {
+ type = extraConfigType;
+ default = {};
+ description = ''
+ Remote store extra configuration.
+ '';
+ };
+
+ extraConfig.account = mkOption {
+ type = extraConfigType;
+ default = {};
+ example = literalExample ''
+ {
+ PipelineDepth = 10;
+ Timeout = 60;
+ };
+ '';
+ description = ''
+ Account section extra configuration.
+ '';
+ };
+ };
+}