mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-08 14:40:19 +02:00
(feat): reformatted code for flakes usage
This commit is contained in:
parent
d29d6f0133
commit
c3956d6fa4
40 changed files with 130 additions and 76 deletions
93
features/server/services/synapse-matrix.nix
Normal file
93
features/server/services/synapse-matrix.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
baseUrl = "https://talk.hypervirtual.world";
|
||||
in
|
||||
{
|
||||
networking.domain = "hypervirtual.world";
|
||||
sops.secrets.matrix_data = {
|
||||
format = "yaml";
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server_name = "hypervirtual.world";
|
||||
public_baseurl = baseUrl;
|
||||
enable_registration = false;
|
||||
listeners = [
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = [
|
||||
"::1"
|
||||
"0.0.0.0"
|
||||
];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
"metrics"
|
||||
];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
port = 9000;
|
||||
type = "metrics";
|
||||
tls = false;
|
||||
bind_addresses = [
|
||||
"::1"
|
||||
"0.0.0.0"
|
||||
];
|
||||
resources = [ ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extras = [
|
||||
"systemd"
|
||||
"postgres"
|
||||
"url-preview"
|
||||
"user-search"
|
||||
];
|
||||
|
||||
extraConfigFiles = [ "/run/secrets/matrix_data" ];
|
||||
};
|
||||
|
||||
/*
|
||||
services.mautrix-discord = {
|
||||
enable = true;
|
||||
environmentFile = "";
|
||||
|
||||
settings = {
|
||||
homeserver = {
|
||||
address = "http://localhost:8008";
|
||||
domain = "hypervirtual.world";
|
||||
};
|
||||
appservice = {
|
||||
provisioning.enabled = false;
|
||||
id = "discord";
|
||||
public = {
|
||||
|
||||
};
|
||||
|
||||
database = "";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue