[matrix.havenisms.com] Sets up Continuwuity for a migration, but migration failed so disabled

This commit is contained in:
Periodic committed 2026-09-21 15:18:57 -07:00
1 parent 13bcb887e7
commit 6583cffeb8
4 files changed
+76 -16

No files matched your search

@@ -0,0 +1,56 @@
{ config, ... }:
let
inherit (import ../lib.nix config) havenisms;
matrixHost = "matrix";
serviceName = "matrix-havenisms-com";
dbPath = "/var/lib/matrix";
port = 8448;
in
{
sops.secrets = {
"matrix/${serviceName}/registration-token" = {
restartUnits = [ "${config.local.container-backend}-${serviceName}.service" ];
};
};
sops.templates."${serviceName}.env".content = ''
CONTINUWUITY_REGISTRATION_TOKEN=${
config.sops.placeholder."matrix/${serviceName}/registration-token"
}
CONTINUWUITY_ADDRESS=0.0.0.0
CONTINUWUITY_SERVER_NAME=havenisms.com
CONTINUWUITY_ALLOW_REGISTRATION=false
CONTINUWUITY_ALLOW_CHECK_FOR_UPDATES=true
CONTINUWUITY_ALLOW_FEDERATION=true
CONTINUWUITY_DATABASE_BACKEND=rocksdb
CONTINUWUITY_DATABASE_PATH=${dbPath}
CONTINUWUITY_WELL_KNOWN={ server=${matrixHost}.havenisms.com:443 }
CONTINUWUITY_TRUSTED_SERVERS=["matrix.org", "chat.havenisms.com", "matrix.blazestar.net"]
'';
# This isn't using any of my usual helpers because I wanted to set a custom
# serviceName in Traefik that is different from the hostname
virtualisation.web-containers.containers."${serviceName}" = {
image = "forgejo.ellis.link/continuwuation/continuwuity:latest";
port = port;
hostname = matrixHost;
domain = havenisms;
volumes = [
"/tank/matrix/home:${dbPath}"
];
environment = {
CONTINUWUITY_PORT = toString port;
};
environmentFiles = [
config.sops.templates."${serviceName}.env".path
];
extraLabels = {
# Redirect well-known requests to this host.
"traefik.http.routers.${serviceName}-well-known.rule" =
"Host(`${havenisms}`) && PathPrefix(`/.well-known/matrix`)";
"traefik.http.routers.${serviceName}-well-known.service" = serviceName;
# Increase the priority so that this will override other routers for the host.
"traefik.http.routers.${serviceName}-well-known.priority" = "1000";
};
};
}
@@ -66,19 +66,19 @@ in
};
# This server helps to serve the .well-known files that are required by clients to find the sync server.
matrix-well-known = {
image = "nginx";
dependsOn = [ "synapse" ];
volumes = [
"/tank/config/synapse/static-files:/usr/share/nginx/html:ro"
];
extraOptions = [
"-l=traefik.enable=true"
"-l=traefik.http.middlewares.strip-well-known.stripprefix.prefixes=/.well-known"
"-l=traefik.http.routers.matrix-well-known.rule=${wellKnownRule}"
"-l=traefik.http.routers.matrix-well-known.middlewares=strip-well-known"
"-l=traefik.http.services.matrix-well-known.loadbalancer.server.port=80"
];
};
# matrix-well-known = {
# image = "nginx";
# dependsOn = [ "synapse" ];
# volumes = [
# "/tank/config/synapse/static-files:/usr/share/nginx/html:ro"
# ];
# extraOptions = [
# "-l=traefik.enable=true"
# "-l=traefik.http.middlewares.strip-well-known.stripprefix.prefixes=/.well-known"
# "-l=traefik.http.routers.matrix-well-known.rule=${wellKnownRule}"
# "-l=traefik.http.routers.matrix-well-known.middlewares=strip-well-known"
# "-l=traefik.http.services.matrix-well-known.loadbalancer.server.port=80"
# ];
# };
};
}
@@ -2,6 +2,8 @@
{
imports = [
./chat.nix
# Migration paused
# ./chat-beta.nix
# Currently disabled because it doesn't start up properly
# ./immich.nix
./storyden.nix