1{ config, lib, name, ... }:
2
3with lib;
4{
5 options = {
6 dataPath = mkOption {
7 type = types.path;
8 default = "/var/lib/pantalaimon-${name}";
9 description = lib.mdDoc ''
10 The directory where `pantalaimon` should store its state such as the database file.
11 '';
12 };
13
14 logLevel = mkOption {
15 type = types.enum [ "info" "warning" "error" "debug" ];
16 default = "warning";
17 description = lib.mdDoc ''
18 Set the log level of the daemon.
19 '';
20 };
21
22 homeserver = mkOption {
23 type = types.str;
24 example = "https://matrix.org";
25 description = lib.mdDoc ''
26 The URI of the homeserver that the `pantalaimon` proxy should
27 forward requests to, without the matrix API path but including
28 the http(s) schema.
29 '';
30 };
31
32 ssl = mkOption {
33 type = types.bool;
34 default = true;
35 description = lib.mdDoc ''
36 Whether or not SSL verification should be enabled for outgoing
37 connections to the homeserver.
38 '';
39 };
40
41 listenAddress = mkOption {
42 type = types.str;
43 default = "localhost";
44 description = lib.mdDoc ''
45 The address where the daemon will listen to client connections
46 for this homeserver.
47 '';
48 };
49
50 listenPort = mkOption {
51 type = types.port;
52 default = 8009;
53 description = lib.mdDoc ''
54 The port where the daemon will listen to client connections for
55 this homeserver. Note that the listen address/port combination
56 needs to be unique between different homeservers.
57 '';
58 };
59
60 extraSettings = mkOption {
61 type = types.attrs;
62 default = { };
63 description = lib.mdDoc ''
64 Extra configuration options. See
65 [pantalaimon(5)](https://github.com/matrix-org/pantalaimon/blob/master/docs/man/pantalaimon.5.md)
66 for available options.
67 '';
68 };
69 };
70}