1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00
home-manager/modules/programs/vdirsyncer-accounts.nix
Emily 36a53d9f26 treewide: convert all option docs to Markdown
This process was automated by [my fork of `nix-doc-munge`]. All
conversions were automatically checked to produce the same DocBook
result when converted back, modulo minor typographical/formatting
differences on the acceptable-to-desirable spectrum.

To reproduce this commit, run:

  $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
    nix shell nixpkgs#coreutils \
    -c find . -name '*.nix' \
    -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
    {} +
  $ ./format

[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge/tree/home-manager
2023-07-17 18:40:56 +01:00

187 lines
5.1 KiB
Nix

{ lib, ... }:
with lib;
let
collection = types.either types.str (types.listOf types.str);
in {
options.vdirsyncer = {
enable = mkEnableOption (lib.mdDoc "synchronization using vdirsyncer");
collections = mkOption {
type = types.nullOr (types.listOf collection);
default = null;
description = lib.mdDoc ''
The collections to synchronize between the storages.
'';
};
conflictResolution = mkOption {
type = types.nullOr
(types.either (types.enum [ "remote wins" "local wins" ])
(types.listOf types.str));
default = null;
description = lib.mdDoc ''
What to do in case of a conflict between the storages. Either
`remote wins` or
`local wins` or
a list that contains a command to run. By default, an error
message is printed.
'';
};
partialSync = mkOption {
type = types.nullOr (types.enum [ "revert" "error" "ignore" ]);
default = null;
description = lib.mdDoc ''
What should happen if synchronization in one direction
is impossible due to one storage being read-only.
Defaults to `revert`.
See
<https://vdirsyncer.pimutils.org/en/stable/config.html#pair-section>
for more information.
'';
};
metadata = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "color" "displayname" ];
description = lib.mdDoc ''
Metadata keys that should be synchronized when vdirsyncer
metasync is executed.
'';
};
timeRange = mkOption {
type = types.nullOr (types.submodule {
options = {
start = mkOption {
type = types.str;
description = lib.mdDoc "Start of time range to show.";
};
end = mkOption {
type = types.str;
description = lib.mdDoc "End of time range to show.";
};
};
});
default = null;
description = lib.mdDoc ''
A time range to synchronize. start and end can be any Python
expression that returns a `datetime.datetime`
object.
'';
example = {
start = "datetime.now() - timedelta(days=365)";
end = "datetime.now() + timedelta(days=365)";
};
};
itemTypes = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
description = lib.mdDoc ''
Kinds of items to show. The default is to show everything.
This depends on particular features of the server, the results
are not validated.
'';
};
verify = mkOption {
type = types.nullOr types.bool;
default = null;
description = lib.mdDoc "Verify SSL certificate.";
};
verifyFingerprint = mkOption {
type = types.nullOr types.str;
default = null;
description = lib.mdDoc ''
Optional. SHA1 or MD5 fingerprint of the expected server certificate.
See
<https://vdirsyncer.pimutils.org/en/stable/ssl-tutorial.html#ssl-tutorial>
for more information.
'';
};
auth = mkOption {
type = types.nullOr (types.enum [ "basic" "digest" "guess" ]);
default = null;
description = lib.mdDoc ''
Authentication settings. The default is `basic`.
'';
};
authCert = mkOption {
type = types.nullOr (types.either types.str (types.listOf types.str));
default = null;
description = lib.mdDoc ''
Either a path to a certificate with a client certificate and
the key or a list of paths to the files with them.
'';
};
userAgent = mkOption {
type = types.nullOr types.str;
default = null;
description = lib.mdDoc ''
The user agent to report to the server. Defaults to
`vdirsyncer`.
'';
};
postHook = mkOption {
type = types.lines;
default = "";
description = lib.mdDoc ''
Command to call for each item creation and modification.
The command will be called with the path of the new/updated
file.
'';
};
## Options for google storages
tokenFile = mkOption {
type = types.nullOr types.str;
default = null;
description = lib.mdDoc ''
A file path where access tokens are stored.
'';
};
clientIdCommand = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "pass" "client_id" ];
description = lib.mdDoc ''
A command that prints the OAuth credentials to standard
output.
See
<https://vdirsyncer.pimutils.org/en/stable/config.html#google>
for more information.
'';
};
clientSecretCommand = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "pass" "client_secret" ];
description = lib.mdDoc ''
A command that prints the OAuth credentials to standard
output.
See
<https://vdirsyncer.pimutils.org/en/stable/config.html#google>
for more information.
'';
};
};
}