about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorSophie Tauchert <sophie.tauchert@relaxdays.de>2023-07-07 11:55:10 +0200
committerSophie Tauchert <sophie@999eagle.moe>2023-09-18 08:24:36 +0200
commit2edea7611bff66697e1aa5f5b8921a5be9d3e6a6 (patch)
treedde961cbeb9dbb51d1c58349e08a2ba75ca6cd46 /nixos/modules/services
parentb20cbb12cdcb1fb81a22f58f028a2d876eafa832 (diff)
downloadnixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar.gz
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar.bz2
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar.lz
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar.xz
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.tar.zst
nixlib-2edea7611bff66697e1aa5f5b8921a5be9d3e6a6.zip
nixos/synapse: document options better
Co-authored-by: Daniel Olsen <daniel.olsen99@gmail.com>
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/matrix/synapse.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix
index c779105abf25..52074f1d9a62 100644
--- a/nixos/modules/services/matrix/synapse.nix
+++ b/nixos/modules/services/matrix/synapse.nix
@@ -761,6 +761,28 @@ in {
               '';
             };
 
+            redis = lib.mkOption {
+              type = types.submodule {
+                freeformType = format.type;
+                options = {
+                  enabled = lib.mkOption {
+                    type = types.bool;
+                    default = false;
+                    description = lib.mdDoc ''
+                      Whether to use redis support
+                    '';
+                  };
+                };
+              };
+              default = { };
+              description = lib.mdDoc ''
+                Redis configuration for synapse.
+
+                See the
+                [upstream documentation](https://github.com/matrix-org/synapse/blob/v${pkgs.matrix-synapse-unwrapped.version}/usage/configuration/config_documentation.md#redis)
+                for available options.
+              '';
+            };
           };
         };
       };
@@ -795,6 +817,14 @@ in {
               type = types.attrsOf (types.submodule {
                 freeformType = format.type;
                 options = {
+                  worker_app = lib.mkOption {
+                    type = types.enum [
+                      "synapse.app.generic_worker"
+                      "synapse.app.media_repository"
+                    ];
+                    description = "Type of this worker";
+                    default = "synapse.app.generic_worker";
+                  };
                   worker_listeners = lib.mkOption {
                     default = [ ];
                     type = types.listOf listenerType;
@@ -810,6 +840,25 @@ in {
                 [worker documention](https://matrix-org.github.io/synapse/latest/workers.html#worker-configuration)
                 for possible values.
               '';
+              example = lib.literalExpression ''
+                {
+                  "federation_sender" = { };
+                  "federation_receiver" = {
+                    worker_listeners = [
+                      {
+                        type = "http";
+                        port = 8009;
+                        bind_addresses = [ "127.0.0.1" ];
+                        tls = false;
+                        x_forwarded = true;
+                        resources = [{
+                          names = [ "federation" ];
+                        }];
+                      }
+                    ];
+                  };
+                }
+              '';
             };
           };
         };