diff options
Diffstat (limited to 'host/Rory-synapse/configuration.nix')
-rwxr-xr-x | host/Rory-synapse/configuration.nix | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/host/Rory-synapse/configuration.nix b/host/Rory-synapse/configuration.nix index bee2233..3baf425 100755 --- a/host/Rory-synapse/configuration.nix +++ b/host/Rory-synapse/configuration.nix @@ -4,6 +4,7 @@ imports = [ ../../modules/base-server.nix + ../../modules/packages/draupnir-as-mjolnir.nix ]; networking = { @@ -90,10 +91,72 @@ services.matrix-synapse = { enable = true; + + settings = { + server_name = "rory.gay"; + + enable_registration = false; + registration_shared_secret = builtins.exec ["cat" "/dev/urandom" "|" "tr" "-dc" "a-zA-Z0-9" "|" "fold" "-w" "256" "|" "head" "-n" "1"]; + + # Alicia - types: https://github.com/NixOS/nixpkgs/blob/release-22.11/nixos/modules/services/matrix/synapse.nix#L410 + + listeners = { + [ + { port = 8008; + bind_addresses = [ "192.168.1.5" ]; + type = "http"; + tls = false; + x_forwarded = true; + resources = [ { + names = [ "client" "federation" ]; + compress = true; + } ]; + } + ]; + }; + }; + + plugins = with pkgs.matrix-synapse-plugins; [ + matrix-synapse-mjolnir-antispam + matrix-synapse-pam + ]; + + dynamic_thumbnails = true; + + + presence = { + enable = true; + update_interval = 60; + }; + url_preview_enabled = true; + + + + database = { + name = "psycopg2"; + args = { + user = "postgres"; + passwordFile = "/run/secrets/matrix-synapse-password"; + database = "matrix-synapse-rory-gay"; + host = "192.168.1.3"; + } + }; app_service_config_files = [ #"/etc/matrix-synapse/appservice-registration.yaml" ]; - + }; + + services.mjolnir = { + enable = true; + pantalaimon = { + enable = true; + username = "mjolnir"; + passwordFile = "/run/secrets/mjolnir-password"; + homeserver = "http://localhost:8008"; + + }; + + managementRoom = "#draupnir-mgmt:rory.gay"; }; system.stateVersion = "22.11"; # DO NOT EDIT! |