Add Matrix facebook bridge
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
let
|
let
|
||||||
domain = "${config.networking.domain}";
|
domain = "${config.networking.domain}";
|
||||||
fqdn = "matrix.${domain}";
|
fqdn = "matrix.${domain}";
|
||||||
|
fbRegistration = builtins.fromJSON ( builtins.readFile config.age.secrets.mautrixfacebook.path );
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -87,6 +88,9 @@ return 200 '${builtins.toJSON client}';
|
|||||||
compress = false; # Offload compressiong to Nginx
|
compress = false; # Offload compressiong to Nginx
|
||||||
} ];
|
} ];
|
||||||
} ];
|
} ];
|
||||||
|
app_service_config_files = [
|
||||||
|
config.age.secrets.mautrixfacebook.path
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open networking ports for the server
|
# Open networking ports for the server
|
||||||
@@ -94,4 +98,28 @@ return 200 '${builtins.toJSON client}';
|
|||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 80 443 ];
|
allowedTCPPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable Facebook bridge
|
||||||
|
age.secrets.mautrixfacebook = {
|
||||||
|
file = ../../secrets/mautrixfacebook.age;
|
||||||
|
owner = "matrix-synapse";
|
||||||
|
};
|
||||||
|
services.mautrix-facebook = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
homeserver = {
|
||||||
|
address = "http://localhost:8448";
|
||||||
|
domain = "thehellings.com";
|
||||||
|
};
|
||||||
|
bridge.permissions = {
|
||||||
|
"@admin:thehellings.com" = "admin";
|
||||||
|
"thehellings.com" = "user";
|
||||||
|
};
|
||||||
|
appservice = {
|
||||||
|
as_token = fbRegistration.as_token;
|
||||||
|
hs_token = fbRegistration.hs_token;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
registrationData = fbRegistration;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -10,4 +10,5 @@ in
|
|||||||
# At the point where you want to use it, put
|
# At the point where you want to use it, put
|
||||||
# age.secrets.matrix.file = ../../secrets/matrix.age;
|
# age.secrets.matrix.file = ../../secrets/matrix.age;
|
||||||
# Then you can reference the file at /run/agenix/matrix
|
# Then you can reference the file at /run/agenix/matrix
|
||||||
|
"mautrixfacebook.age".publicKeys = [ linode user ];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user