From ce7db4dac514ff14a99807d3d7c87f52acc4be7d Mon Sep 17 00:00:00 2001 From: fugi Date: Sat, 17 Dec 2022 21:23:46 +0100 Subject: [PATCH] format, use domain option --- modules/matrix.nix | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/modules/matrix.nix b/modules/matrix.nix index 493168c..be57b89 100644 --- a/modules/matrix.nix +++ b/modules/matrix.nix @@ -1,18 +1,19 @@ { config, pkgs, lib, ... }: let - domain = "staging.ifsr.de"; - domainServer = "matrix.${domain}"; - domainClient = "chat.${domain}"; + domainServer = "matrix.${config.fsr.domain}"; + domainClient = "chat.${config.fsr.domain}"; + clientConfig = { "m.homeserver" = { base_url = "https://${domainServer}:443"; server_name = domainServer; }; - "m.identity_server" = {}; + "m.identity_server" = { }; }; serverConfig = { "m.server" = "${domainServer}:443"; }; + mkWellKnown = data: '' add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; @@ -20,12 +21,12 @@ let ''; in { - #sops.secrets = { - # synapse_registration_secret = { - # owner = "matrix-synapse"; - # group = "matrix-synapse"; - # }; - #}; + # sops.secrets = { + # synapse_registration_secret = { + # owner = "matrix-synapse"; + # group = "matrix-synapse"; + # }; + # }; services = { postgresql = { @@ -92,13 +93,13 @@ in # TODO: ldap registration_shared_secret = "registration_shared_secret"; }; - # extraConfigFiles = [ - # (pkgs.writeTextFile { - # name = "matrix-synapse-extra-config.yml"; - # text = '' - # ''; - # }) - # ]; + # extraConfigFiles = [ + # (pkgs.writeTextFile { + # name = "matrix-synapse-extra-config.yml"; + # text = '' + # ''; + # }) + # ]; }; };