mirror of
https://github.com/nix-community/home-manager
synced 2024-06-30 18:38:31 +02:00
To allow supporting more advanced configurations. The local refers to the "maildir store" configuration, remote to the "IMAP store", and "channel" to the channel.
94 lines
2.0 KiB
Nix
94 lines
2.0 KiB
Nix
{ 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.
|
|
'';
|
|
};
|
|
};
|
|
}
|