aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/lieer-accounts.nix
blob: 238049065b39eba35ec7c976018095cec5934da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ lib, ... }:

with lib;

{
  options.lieer = {
    enable = mkEnableOption "lieer Gmail synchronization for notmuch";

    timeout = mkOption {
      type = types.ints.unsigned;
      default = 0;
      description = ''
        HTTP timeout in seconds. 0 means forever or system timeout.
      '';
    };

    replaceSlashWithDot = mkOption {
      type = types.bool;
      default = false;
      description = ''
        Replace '/' with '.' in Gmail labels.
      '';
    };

    dropNonExistingLabels = mkOption {
      type = types.bool;
      default = false;
      description = ''
        Allow missing labels on the Gmail side to be dropped.
      '';
    };

    ignoreTagsLocal = mkOption {
      type = types.listOf types.str;
      default = [ ];
      description = ''
        Set custom tags to ignore when syncing from local to
        remote (after translations).
      '';
    };

    ignoreTagsRemote = mkOption {
      type = types.listOf types.str;
      default = [
        "CATEGORY_FORUMS"
        "CATEGORY_PROMOTIONS"
        "CATEGORY_UPDATES"
        "CATEGORY_SOCIAL"
        "CATEGORY_PERSONAL"
      ];
      description = ''
        Set custom tags to ignore when syncing from remote to
        local (before translations).
      '';
    };

    notmuchSetupWarning = mkOption {
      type = types.bool;
      default = true;
      description = ''
        Warn if Notmuch is not also enabled for this account.
        </para><para>
        This can safely be disabled if <command>notmuch init</command>
        has been used to configure this account outside of Home
        Manager.
      '';
    };
  };
}