fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ lib , ...} : 2 3with lib ; 4 5let 6 7collection = types . either types . str ( types . listOf types . str ); 8 9in { 10options . vdirsyncer = { 11enable = mkEnableOption "synchronization using vdirsyncer" ; 12 13collections = mkOption { 14type = types . nullOr ( types . listOf collection ); 15default = null ; 16description = '' 17The collections to synchronize between the storages. 18'' ; 19}; 20 21conflictResolution = mkOption { 22type = types . nullOr 23( types . either ( types . enum [ "remote wins" "local wins" ]) 24( types . listOf types . str )); 25default = null ; 26description = '' 27What to do in case of a conflict between the storages. Either 28`remote wins` or 29`local wins` or 30a list that contains a command to run. By default, an error 31message is printed. 32'' ; 33}; 34 35partialSync = mkOption { 36type = types . nullOr ( types . enum [ "revert" "error" "ignore" ]); 37default = null ; 38description = '' 39What should happen if synchronization in one direction 40is impossible due to one storage being read-only. 41Defaults to `revert`. 42 43See 44<https://vdirsyncer.pimutils.org/en/stable/config.html#pair-section> 45for more information. 46'' ; 47}; 48 49metadata = mkOption { 50type = types . listOf types . str ; 51default = [ ]; 52example = [ "color" "displayname" ]; 53description = '' 54Metadata keys that should be synchronized when vdirsyncer 55metasync is executed. 56'' ; 57}; 58 59timeRange = mkOption { 60type = types . nullOr ( types . submodule { 61options = { 62start = mkOption { 63type = types . str ; 64description = "Start of time range to show." ; 65}; 66 67end = mkOption { 68type = types . str ; 69description = "End of time range to show." ; 70}; 71}; 72}); 73default = null ; 74description = '' 75A time range to synchronize. start and end can be any Python 76expression that returns a `datetime.datetime` 77object. 78'' ; 79example = { 80start = "datetime.now() - timedelta(days=365)" ; 81end = "datetime.now() + timedelta(days=365)" ; 82}; 83}; 84 85itemTypes = mkOption { 86type = types . nullOr ( types . listOf types . str ); 87default = null ; 88description = '' 89Kinds of items to show. The default is to show everything. 90This depends on particular features of the server, the results 91are not validated. 92'' ; 93}; 94 95verify = mkOption { 96type = types . nullOr types . bool ; 97default = null ; 98description = "Verify SSL certificate." ; 99}; 100 101verifyFingerprint = mkOption { 102type = types . nullOr types . str ; 103default = null ; 104description = '' 105Optional. SHA1 or MD5 fingerprint of the expected server certificate. 106 107See 108<https://vdirsyncer.pimutils.org/en/stable/ssl-tutorial.html#ssl-tutorial> 109for more information. 110'' ; 111}; 112 113auth = mkOption { 114type = types . nullOr ( types . enum [ "basic" "digest" "guess" ]); 115default = null ; 116description = '' 117Authentication settings. The default is `basic`. 118'' ; 119}; 120 121authCert = mkOption { 122type = types . nullOr ( types . either types . str ( types . listOf types . str )); 123default = null ; 124description = '' 125Either a path to a certificate with a client certificate and 126the key or a list of paths to the files with them. 127'' ; 128}; 129 130userAgent = mkOption { 131type = types . nullOr types . str ; 132default = null ; 133description = '' 134The user agent to report to the server. Defaults to 135`vdirsyncer`. 136'' ; 137}; 138 139postHook = mkOption { 140type = types . lines ; 141default = "" ; 142description = '' 143Command to call for each item creation and modification. 144The command will be called with the path of the new/updated 145file. 146'' ; 147}; 148 149## Options for google storages 150 151tokenFile = mkOption { 152type = types . nullOr types . str ; 153default = null ; 154description = '' 155A file path where access tokens are stored. 156'' ; 157}; 158 159clientIdCommand = mkOption { 160type = types . nullOr ( types . listOf types . str ); 161default = null ; 162example = [ "pass" "client_id" ]; 163description = '' 164A command that prints the OAuth credentials to standard 165output. 166 167See 168<https://vdirsyncer.pimutils.org/en/stable/config.html#google> 169for more information. 170'' ; 171}; 172 173clientSecretCommand = mkOption { 174type = types . nullOr ( types . listOf types . str ); 175default = null ; 176example = [ "pass" "client_secret" ]; 177description = '' 178A command that prints the OAuth credentials to standard 179output. 180 181See 182<https://vdirsyncer.pimutils.org/en/stable/config.html#google> 183for more information. 184'' ; 185}; 186}; 187}