continuwuity migration
This commit is contained in:
parent
7869d962c0
commit
d5254c453c
7 changed files with 299 additions and 245 deletions
|
@ -4,7 +4,11 @@
|
|||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
client = config.services.matrix-continuwuity.settings.global.well_known.client;
|
||||
server_name = config.services.matrix-continuwuity.settings.global.server_name;
|
||||
|
||||
settings = {
|
||||
backfill.enabled = true;
|
||||
|
||||
|
@ -14,8 +18,8 @@
|
|||
};
|
||||
|
||||
homeserver = {
|
||||
domain = config.services.grapevine.settings.server_name;
|
||||
address = config.services.grapevine.settings.server_discovery.client.base_url;
|
||||
domain = server_name;
|
||||
address = client;
|
||||
};
|
||||
|
||||
bridge = {
|
||||
|
@ -25,49 +29,61 @@
|
|||
require = false;
|
||||
};
|
||||
permissions = {
|
||||
"${config.services.grapevine.settings.server_name}" = "user";
|
||||
"@quadradical:${config.services.grapevine.settings.server_name}" = "admin";
|
||||
"${server_name}" = "user";
|
||||
"@quadradical:${server_name}" = "admin";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [inputs.nix-matrix-appservices.nixosModule inputs.ooye.modules.default];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-matrix-appservices.nixosModule
|
||||
inputs.ooye.modules.default
|
||||
];
|
||||
|
||||
services = let
|
||||
domain = "ooye.federated.nexus";
|
||||
in {
|
||||
matrix-appservices.services = builtins.mapAttrs (name: value:
|
||||
value
|
||||
// {
|
||||
inherit settings;
|
||||
format = "mautrix-go";
|
||||
port = 8000;
|
||||
package = value.package.override {withGoolm = true;};
|
||||
}) {
|
||||
whatsapp = {
|
||||
host = "127.0.0.4";
|
||||
serviceConfig.EnvironmentFile = config.age.secrets."whatsapp.age".path;
|
||||
package = pkgs.mautrix-whatsapp;
|
||||
services =
|
||||
let
|
||||
domain = "ooye.federated.nexus";
|
||||
in
|
||||
{
|
||||
matrix-appservices.services =
|
||||
builtins.mapAttrs
|
||||
(
|
||||
name: value:
|
||||
value
|
||||
// {
|
||||
inherit settings;
|
||||
format = "mautrix-go";
|
||||
port = 8000;
|
||||
package = value.package.override { withGoolm = true; };
|
||||
}
|
||||
)
|
||||
{
|
||||
whatsapp = {
|
||||
host = "127.0.0.4";
|
||||
serviceConfig.EnvironmentFile = config.age.secrets."whatsapp.age".path;
|
||||
package = pkgs.mautrix-whatsapp;
|
||||
};
|
||||
gmessages = {
|
||||
host = "127.0.0.5";
|
||||
serviceConfig.EnvironmentFile = config.age.secrets."gmessages.age".path;
|
||||
package = pkgs.mautrix-gmessages;
|
||||
};
|
||||
};
|
||||
|
||||
matrix-ooye = {
|
||||
enable = true;
|
||||
homeserver = client;
|
||||
homeserverName = "federated.nexus";
|
||||
discordTokenPath = config.age.secrets."discordToken.age".path;
|
||||
discordClientSecretPath = config.age.secrets."discordClientSecret.age".path;
|
||||
socket = "8081";
|
||||
bridgeOrigin = "https://${domain}";
|
||||
};
|
||||
gmessages = {
|
||||
host = "127.0.0.5";
|
||||
serviceConfig.EnvironmentFile = config.age.secrets."gmessages.age".path;
|
||||
package = pkgs.mautrix-gmessages;
|
||||
};
|
||||
};
|
||||
|
||||
matrix-ooye = {
|
||||
enable = true;
|
||||
homeserver = config.services.grapevine.settings.server_discovery.client.base_url;
|
||||
homeserverName = "federated.nexus";
|
||||
discordTokenPath = config.age.secrets."discordToken.age".path;
|
||||
discordClientSecretPath = config.age.secrets."discordClientSecret.age".path;
|
||||
socket = "8081";
|
||||
bridgeOrigin = "https://${domain}";
|
||||
caddy.virtualHosts."${domain}".extraConfig =
|
||||
"reverse_proxy 127.0.0.1:${config.services.matrix-ooye.socket}";
|
||||
};
|
||||
|
||||
caddy.virtualHosts."${domain}".extraConfig = "reverse_proxy 127.0.0.1:${config.services.matrix-ooye.socket}";
|
||||
};
|
||||
|
||||
systemd.services.matrix-ooye.serviceConfig.Restart = lib.mkForce "always";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue