forked from hinterland/hearth
fix?: matrix-cluster-users
This commit is contained in:
@@ -10,12 +10,15 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
legacyCfg = config.hectic.services.matrix;
|
legacyCfg = config.hectic.services.matrix;
|
||||||
clusterCfg = config.hectic.generic.matrix-cluster;
|
hasClusterCfg = config.hectic ? generic && config.hectic.generic ? matrix-cluster;
|
||||||
|
clusterCfg = if hasClusterCfg then config.hectic.generic.matrix-cluster else null;
|
||||||
clusterSynapseEnabled =
|
clusterSynapseEnabled =
|
||||||
clusterCfg.enable
|
if hasClusterCfg
|
||||||
&& (if clusterCfg.overrideEnableSynapse != null then clusterCfg.overrideEnableSynapse else clusterCfg.role == "primary");
|
then clusterCfg.enable
|
||||||
|
&& (if clusterCfg.overrideEnableSynapse != null then clusterCfg.overrideEnableSynapse else clusterCfg.role == "primary")
|
||||||
|
else false;
|
||||||
enabled = legacyCfg.enable || clusterSynapseEnabled;
|
enabled = legacyCfg.enable || clusterSynapseEnabled;
|
||||||
matrixDomain = if legacyCfg.enable then legacyCfg.matrixDomain else clusterCfg.matrixDomain;
|
matrixDomain = if legacyCfg.enable then legacyCfg.matrixDomain else if hasClusterCfg then clusterCfg.matrixDomain else "";
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf enabled (let
|
config = lib.mkIf enabled (let
|
||||||
keyFile = "/run/livekit.key";
|
keyFile = "/run/livekit.key";
|
||||||
|
|||||||
@@ -10,16 +10,19 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
legacyCfg = config.hectic.services.matrix;
|
legacyCfg = config.hectic.services.matrix;
|
||||||
clusterCfg = config.hectic.generic.matrix-cluster;
|
hasClusterCfg = config.hectic ? generic && config.hectic.generic ? matrix-cluster;
|
||||||
|
clusterCfg = if hasClusterCfg then config.hectic.generic.matrix-cluster else null;
|
||||||
clusterSynapseEnabled =
|
clusterSynapseEnabled =
|
||||||
clusterCfg.enable
|
if hasClusterCfg
|
||||||
&& (if clusterCfg.overrideEnableSynapse != null then clusterCfg.overrideEnableSynapse else clusterCfg.role == "primary");
|
then clusterCfg.enable
|
||||||
|
&& (if clusterCfg.overrideEnableSynapse != null then clusterCfg.overrideEnableSynapse else clusterCfg.role == "primary")
|
||||||
|
else false;
|
||||||
enabled = legacyCfg.enable || clusterSynapseEnabled;
|
enabled = legacyCfg.enable || clusterSynapseEnabled;
|
||||||
matrixDomain = if legacyCfg.enable then legacyCfg.matrixDomain else clusterCfg.matrixDomain;
|
matrixDomain = if legacyCfg.enable then legacyCfg.matrixDomain else if hasClusterCfg then clusterCfg.matrixDomain else "";
|
||||||
jitsiPreferredDomain =
|
jitsiPreferredDomain =
|
||||||
if legacyCfg.enable && config.hectic.services.jitsi.enable
|
if legacyCfg.enable && config.hectic.services.jitsi.enable
|
||||||
then config.hectic.services.jitsi.hostName
|
then config.hectic.services.jitsi.hostName
|
||||||
else clusterCfg.jitsi.preferredDomain;
|
else if hasClusterCfg then clusterCfg.jitsi.preferredDomain else null;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf enabled {
|
config = lib.mkIf enabled {
|
||||||
services.nginx.virtualHosts."element.${matrixDomain}" = {
|
services.nginx.virtualHosts."element.${matrixDomain}" = {
|
||||||
|
|||||||
Reference in New Issue
Block a user