aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-01-11 17:39:32 +0900
committersefidel <contact@sefidel.net>2024-01-12 00:18:46 +0900
commit26b33c01c240a5436c418b06e76da76140f7df71 (patch)
tree6e2c93924ffc8007b02b3144511e305e3d60e24a
parent9b872761436ff2a536fb773bf1219cd9067d2ad7 (diff)
downloadinfra-26b33c01c240a5436c418b06e76da76140f7df71.zip
chore(overlays, modules/matrix-homeserver): remove obsolete sliding-sync module
-rw-r--r--modules/services/matrix-homeserver.nix5
-rw-r--r--overlays/sliding-sync-module.nix94
2 files changed, 0 insertions, 99 deletions
diff --git a/modules/services/matrix-homeserver.nix b/modules/services/matrix-homeserver.nix
index 63691d3..6687e1d 100644
--- a/modules/services/matrix-homeserver.nix
+++ b/modules/services/matrix-homeserver.nix
@@ -9,11 +9,6 @@ let
metricsPort = 8010;
in
{
- imports = [
- # TODO: remove obsolete module
- ../../overlays/sliding-sync-module.nix
- ];
-
options.modules.services.matrix-homeserver = {
enable = mkEnableOption "matrix homeserver instance";
domain = mkOption { type = types.str; };
diff --git a/overlays/sliding-sync-module.nix b/overlays/sliding-sync-module.nix
deleted file mode 100644
index 8117e2b..0000000
--- a/overlays/sliding-sync-module.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- cfg = config.services.sliding-sync;
-in
-{
- # TODO: add default values
- options.services.sliding-sync = {
- enable = lib.mkEnableOption (lib.mdDoc "matrix.org sliding-sync");
- server = lib.mkOption {
- type = lib.types.str;
- # default = "https://matrix-client.matrix.org" # TODO: required?
- description = lib.mdDoc ''
- The destination homeserver to talk to (CS API HTTPS URL)
- '';
- };
- db = lib.mkOption {
- type = lib.types.str;
- description = lib.mdDoc ''
- The postgres connection string: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
- '';
- };
- bindAddr = lib.mkOption {
- type = lib.types.str;
- default = "0.0.0.0:8008";
- description = lib.mdDoc ''
- The interface and port to listen on.
- '';
- };
- secret = lib.mkOption {
- type = lib.types.str;
- description = lib.mdDoc ''
- A secret to use to encrypt access tokens.
- Must remain the same for the lifetime of the database.
- '';
- };
- pprof = lib.mkOption {
- type = lib.types.nullOr lib.types.str;
- default = null;
- description = lib.mdDoc ''
- The bind addr for pprof debugging e.g ':6060'.
- If not set, does not listen.
- '';
- };
- prom = lib.mkOption {
- type = lib.types.nullOr lib.types.str;
- default = null;
- description = lib.mdDoc ''
- The bind addr for Prometheus metrics,
- which will be accessible at /metrics at this address.
- '';
- };
- jaegerUrl = lib.mkOption {
- type = lib.types.nullOr lib.types.str;
- default = null;
- description = lib.mdDoc ''
- The Jaeger URL to send spans to e.g http://localhost:14268/api/traces
- If unset does not send OTLP traces.
- '';
- };
- after = lib.mkOption {
- type = lib.types.listOf lib.types.str;
- default = null;
- description = lib.mdDoc ''
- The service that should start before the sliding-sync proxy.
- '';
- };
- };
-
- config = lib.mkIf cfg.enable {
- systemd.services.sliding-sync = {
- description = "MSC3575 Matrix Sliding Sync Proxy";
- after = [
- "network.target"
- ] ++ cfg.after;
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- Type = "simple";
- DynamicUser = true;
- ExecStart =
- "${pkgs.matrix-sliding-sync}/bin/syncv3";
- Restart = "on-failure";
- };
- environment = {
- SYNCV3_SERVER = cfg.server;
- SYNCV3_DB = cfg.db;
- SYNCV3_SECRET = cfg.secret;
- SYNCV3_BINDADDR = cfg.bindAddr;
- SYNCV3_PPROF = cfg.pprof;
- SYNCV3_PROM = cfg.prom;
- SYNCV3_JAEGER_URL = cfg.jaegerUrl;
- };
- };
- };
-}