clanModules: init matrix-synapse #1017
@ -27,6 +27,7 @@
|
|||||||
secrets = import ./secrets nixosTestArgs;
|
secrets = import ./secrets nixosTestArgs;
|
||||||
container = import ./container nixosTestArgs;
|
container = import ./container nixosTestArgs;
|
||||||
deltachat = import ./deltachat nixosTestArgs;
|
deltachat = import ./deltachat nixosTestArgs;
|
||||||
|
matrix-synapse = import ./matrix-synapse nixosTestArgs;
|
||||||
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
|
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
|
||||||
borgbackup = import ./borgbackup nixosTestArgs;
|
borgbackup = import ./borgbackup nixosTestArgs;
|
||||||
syncthing = import ./syncthing nixosTestArgs;
|
syncthing = import ./syncthing nixosTestArgs;
|
||||||
|
37
checks/matrix-synapse/default.nix
Normal file
37
checks/matrix-synapse/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
(import ../lib/container-test.nix) (
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
name = "matrix-synapse";
|
||||||
|
|
||||||
|
nodes.machine =
|
||||||
|
{ self, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
self.clanModules.matrix-synapse
|
||||||
|
self.nixosModules.clanCore
|
||||||
|
{
|
||||||
|
clanCore.machineName = "machine";
|
||||||
|
clanCore.clanDir = ./.;
|
||||||
|
clan.matrix-synapse = {
|
||||||
|
enable = true;
|
||||||
|
domain = "clan.test";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# secret override
|
||||||
|
clanCore.secrets.matrix-synapse.secrets.synapse-registration_shared_secret.path = "${./synapse-registration_shared_secret}";
|
||||||
|
services.nginx.virtualHosts."matrix.clan.test" = {
|
||||||
|
enableACME = lib.mkForce false;
|
||||||
|
forceSSL = lib.mkForce false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
machine.wait_for_unit("matrix-synapse")
|
||||||
|
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 8008")
|
||||||
|
machine.succeed("${pkgs.curl}/bin/curl -Ssf -L http://localhost/_matrix/static/ -H 'Host: matrix.clan.test'")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
1
checks/matrix-synapse/synapse-registration_shared_secret
Normal file
1
checks/matrix-synapse/synapse-registration_shared_secret
Normal file
@ -0,0 +1 @@
|
|||||||
|
registration_shared_secret: supersecret
|
Loading…
Reference in New Issue
Block a user