mbsync: option for configuring a channel
A channel is a relationship between 2 directories/boxes/mailboxes between the local machine (slave) and the remote mail server (master). Each channel must be given at least: * an account-unique name * a pattern for which mailboxes to sync from master * a pattern for what directory where that mail ends up on the slave Additional options can be added later.
This commit is contained in:
parent
a94c8b072e
commit
d6dcf9f106
|
@ -6,6 +6,48 @@ let
|
||||||
|
|
||||||
extraConfigType = with lib.types; attrsOf (either (either str int) bool);
|
extraConfigType = with lib.types; attrsOf (either (either str int) bool);
|
||||||
|
|
||||||
|
# Options for configuring channel(s) that will be composed together into a group.
|
||||||
|
groupChannel = { config, ... }: {
|
||||||
|
options = {
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "DEFAULT";
|
||||||
|
description = ''
|
||||||
|
The unique name for THIS channel in THIS group. The group will refer to
|
||||||
|
this channel by this name.
|
||||||
|
</para><para>
|
||||||
|
In addition, you can manually sync just this channel by specifying this
|
||||||
|
name to mbsync on the command line.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
masterPattern = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Regular expression pattern for which mailboxes on the remote mail server
|
||||||
|
to sync.
|
||||||
|
</para><para>
|
||||||
|
If this is left as the default, then mbsync will default to the pattern
|
||||||
|
<literal>INBOX</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
slavePattern = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Name for where mail coming from the master mail server will end up
|
||||||
|
locally. The mailbox specified by the master's pattern will be placed
|
||||||
|
in this directory.
|
||||||
|
</para><para>
|
||||||
|
If this is left as the default, then mbsync will default to the pattern
|
||||||
|
<literal>INBOX</literal>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.mbsync = {
|
options.mbsync = {
|
||||||
enable = mkEnableOption "synchronization using mbsync";
|
enable = mkEnableOption "synchronization using mbsync";
|
||||||
|
|
Loading…
Reference in a new issue