Debloat matrix
This commit is contained in:
parent
02a81c1dd4
commit
92ea949c6d
@ -4,13 +4,14 @@ let
|
|||||||
domain = "matrix.giugl.io";
|
domain = "matrix.giugl.io";
|
||||||
webui_domain = "chat.giugl.io";
|
webui_domain = "chat.giugl.io";
|
||||||
network = import ./network.nix;
|
network = import ./network.nix;
|
||||||
|
db_name = "matrix-synapse";
|
||||||
in {
|
in {
|
||||||
services = {
|
services = {
|
||||||
matrix-synapse = {
|
matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server_name = "${domain}";
|
server_name = "${domain}";
|
||||||
database_name = "synapse";
|
database_name = db_name;
|
||||||
public_baseurl = "https://${domain}";
|
public_baseurl = "https://${domain}";
|
||||||
registration_shared_secret = "runas!";
|
registration_shared_secret = "runas!";
|
||||||
url_preview_enabled = true;
|
url_preview_enabled = true;
|
||||||
@ -22,36 +23,9 @@ in {
|
|||||||
# "/var/lib/matrix-synapse/hookshot-registration.yml"
|
# "/var/lib/matrix-synapse/hookshot-registration.yml"
|
||||||
# "/var/lib/matrix-synapse/telegram-registration.yaml"
|
# "/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||||
];
|
];
|
||||||
# log_config = ''
|
|
||||||
# version: 1
|
|
||||||
|
|
||||||
# # In systemd's journal, loglevel is implicitly stored, so let's omit it
|
|
||||||
# # from the message text.
|
|
||||||
# formatters:
|
|
||||||
# journal_fmt:
|
|
||||||
# format: '%(name)s: [%(request)s] %(message)s'
|
|
||||||
|
|
||||||
# filters:
|
|
||||||
# context:
|
|
||||||
# (): synapse.util.logcontext.LoggingContextFilter
|
|
||||||
# request: ""
|
|
||||||
|
|
||||||
# handlers:
|
|
||||||
# journal:
|
|
||||||
# class: systemd.journal.JournalHandler
|
|
||||||
# formatter: journal_fmt
|
|
||||||
# filters: [context]
|
|
||||||
# SYSLOG_IDENTIFIER: synapse
|
|
||||||
|
|
||||||
# root:
|
|
||||||
# level: WARN
|
|
||||||
# handlers: [journal]
|
|
||||||
|
|
||||||
# disable_existing_loggers: False
|
|
||||||
# '';
|
|
||||||
listeners = [{
|
listeners = [{
|
||||||
port = 8008;
|
port = 8008;
|
||||||
bind_addresses = ["127.0.0.1"];
|
bind_addresses = [ "::1" ];
|
||||||
type = "http";
|
type = "http";
|
||||||
tls = false;
|
tls = false;
|
||||||
x_forwarded = true;
|
x_forwarded = true;
|
||||||
@ -61,24 +35,18 @@ in {
|
|||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
#extraConfig = ''
|
#extraConfig = ''
|
||||||
# auto_join_rooms:
|
# auto_join_rooms:
|
||||||
# - "#general:matrix.giugl.io"
|
# - "#general:matrix.giugl.io"
|
||||||
# max_upload_size: "50M"
|
# max_upload_size: "50M"
|
||||||
#'';
|
#'';
|
||||||
# turn_uris = [
|
|
||||||
# "turns:turn.giugl.io:5349?transport=udp"
|
|
||||||
# "turns:turn.giugl.io:5349?transport=tcp"
|
|
||||||
# ];
|
|
||||||
# turn_shared_secret = "69duck duck fuck420";
|
|
||||||
# turn_user_lifetime = "1h";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_11;
|
package = pkgs.postgresql_11;
|
||||||
ensureDatabases = [ "synapse" ];
|
ensureDatabases = [ db_name ];
|
||||||
ensureUsers = [{
|
ensureUsers = [{
|
||||||
name = "matrix-synapse";
|
name = "matrix-synapse";
|
||||||
ensurePermissions = { "DATABASE synapse" = "ALL PRIVILEGES"; };
|
ensurePermissions = { "DATABASE synapse" = "ALL PRIVILEGES"; };
|
||||||
@ -151,61 +119,8 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# telegram bridge
|
|
||||||
|
|
||||||
# mautrix-telegram = {
|
|
||||||
# enable = true;
|
|
||||||
# environmentFile = /secrets/mautrix-telegram/mautrix-telegram.env;
|
|
||||||
|
|
||||||
# settings = {
|
|
||||||
# homeserver = {
|
|
||||||
# address = "https://${domain}";
|
|
||||||
# domain = "${domain}";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# appservice = {
|
|
||||||
# provisioning.enabled = false;
|
|
||||||
# id = "telegram";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# bridge = {
|
|
||||||
# permissions = {
|
|
||||||
# "@pepe:${domain}" = "admin";
|
|
||||||
# "${domain}" = "puppeting";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# # Animated stickers conversion requires additional packages in the
|
|
||||||
# # service's path.
|
|
||||||
# # If this isn't a fresh installation, clearing the bridge's uploaded
|
|
||||||
# # file cache might be necessary (make a database backup first!):
|
|
||||||
# # delete from telegram_file where \
|
|
||||||
# # mime_type in ('application/gzip', 'application/octet-stream')
|
|
||||||
# animated_sticker = {
|
|
||||||
# target = "gif";
|
|
||||||
# args = {
|
|
||||||
# width = 256;
|
|
||||||
# height = 256;
|
|
||||||
# fps = 30; # only for webm
|
|
||||||
# background = "020202"; # only for gif, transparency not supported
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
# encryption = {
|
|
||||||
# allow = true;
|
|
||||||
# default = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# systemd.services.mautrix-telegram.path = with pkgs; [
|
|
||||||
# lottieconverter # for animated stickers conversion, unfree package
|
|
||||||
# ffmpeg # if converting animated stickers to webm (very slow!)
|
|
||||||
# ];
|
|
||||||
|
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
${network.architect-lan} ${domain} ${webui_domain}
|
${network.architect-lan} ${domain} ${webui_domain}
|
||||||
${network.architect-wg} ${domain} ${webui_domain}
|
${network.architect-wg} ${domain} ${webui_domain}
|
||||||
|
Loading…
Reference in New Issue
Block a user