Split domains into their own var file and update all files accordingly
This commit is contained in:
parent
47bf9a94cd
commit
fe73fa0d1f
34 changed files with 143 additions and 117 deletions
|
@ -7,16 +7,16 @@
|
|||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix.${config.secrets.jimDomain}";
|
||||
server_name = "matrix.${config.secrets.jimDomain}";
|
||||
base_url = "https://matrix.${config.domains.jim1}";
|
||||
server_name = "matrix.${config.domains.jim1}";
|
||||
};
|
||||
};
|
||||
branding = {
|
||||
#welcome_background_url = "https://staging.${config.secrets.jimDomain}/images/backgrounds/bloxelcom-sunset.jpg";
|
||||
#auth_header_logo_url = "https://staging.${config.secrets.jimDomain}/images/logos/bloxelcom.png";
|
||||
#welcome_background_url = "https://staging.${config.domains.jim1}/images/backgrounds/template-background.png";
|
||||
#auth_header_logo_url = "https://staging.${config.domains.jim1}/images/logos/template-logo.png";
|
||||
};
|
||||
embedded_pages = {
|
||||
home_url = "https://www.${config.secrets.jimDomain}/";
|
||||
home_url = "https://www.${config.domains.jim1}/";
|
||||
};
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."chat.${config.secrets.jimDomain}" = {
|
||||
services.nginx.virtualHosts."chat.${config.domains.jim1}" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "${pkgs.element-web}";
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
max-port = 50000;
|
||||
use-auth-secret = true;
|
||||
static-auth-secret = "will be world readable for local users :(";
|
||||
realm = "turn.${config.secrets.jimDomain}";
|
||||
cert = "/var/lib/acme/turn.${config.secrets.jimDomain}.com/fullchain.pem";
|
||||
pkey = "/var/lib/acme/turn.${config.secrets.jimDomain}.com/key.pem";
|
||||
realm = "turn.${config.domains.jim1}";
|
||||
cert = "/var/lib/acme/turn.${config.domains.jim1}.com/fullchain.pem";
|
||||
pkey = "/var/lib/acme/turn.${config.domains.jim1}.com/key.pem";
|
||||
};
|
||||
|
||||
# Enable coturn on Synapse
|
||||
matrix-synapse.settings = {
|
||||
turn_uris = [
|
||||
"turn:turn.${config.secrets.jimDomain}:3478?transport=udp"
|
||||
"turn:turn.${config.secrets.jimDomain}:3478?transport=tcp"
|
||||
"turn:turn.${config.domains.jim1}:3478?transport=udp"
|
||||
"turn:turn.${config.domains.jim1}:3478?transport=tcp"
|
||||
];
|
||||
turn_shared_secret = config.services.coturn.static-auth-secret;
|
||||
turn_user_lifetime = "1h";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."turn.${config.secrets.jimDomain}" = {
|
||||
services.nginx.virtualHosts."turn.${config.domains.jim1}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
listen = [{
|
||||
|
@ -12,7 +12,7 @@
|
|||
};
|
||||
|
||||
security.acme.certs = {
|
||||
"turn.${config.secrets.jimDomain}" = {
|
||||
"turn.${config.domains.jim1}" = {
|
||||
group = "turnserver";
|
||||
postRun = "systemctl restart coturn.service";
|
||||
};
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server_name = "${config.secrets.jimDomain}";
|
||||
public_baseurl = "https://matrix.${config.secrets.jimDomain}";
|
||||
server_name = "${config.domains.jim1}";
|
||||
public_baseurl = "https://matrix.${config.domains.jim1}";
|
||||
suppress_key_server_warning = true;
|
||||
|
||||
listeners = [{
|
||||
|
@ -23,9 +23,9 @@
|
|||
}];
|
||||
|
||||
email = {
|
||||
notif_from = "Jimbo's Matrix <noreply@${config.secrets.jimDomain}>";
|
||||
smtp_host = "mx.${config.secrets.jimDomain}";
|
||||
smtp_user = "noreply@${config.secrets.jimDomain}";
|
||||
notif_from = "Jimbo's Matrix <noreply@${config.domains.jim1}>";
|
||||
smtp_host = "mx.${config.domains.jim1}";
|
||||
smtp_user = "noreply@${config.domains.jim1}";
|
||||
smtp_pass = config.secrets.noreplyPassword;
|
||||
enable_tls = true;
|
||||
smtp_port = 587;
|
||||
|
@ -36,10 +36,24 @@
|
|||
registrations_require_3pid = [ "email" ];
|
||||
|
||||
# Allow only this range of emails
|
||||
allowed_local_3pids = [{
|
||||
medium = "email";
|
||||
pattern = "^[^@]+@jimbosfiles\\.com$";
|
||||
}];
|
||||
allowed_local_3pids = [
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@jimbosfiles\.com$'';
|
||||
}
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@nixfox\.ca$'';
|
||||
}
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@freecorn1854\.win$'';
|
||||
}
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@lunamoonlight\.xyz$'';
|
||||
}
|
||||
];
|
||||
|
||||
# Set the type of database
|
||||
database.name = "sqlite3";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."matrix.${config.secrets.jimDomain}" = {
|
||||
services.nginx.virtualHosts."matrix.${config.domains.jim1}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
services.matrix-sliding-sync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
SYNCV3_SERVER = "https://matrix.${config.secrets.jimDomain}";
|
||||
SYNCV3_SERVER = "https://matrix.${config.domains.jim1}";
|
||||
SYNCV3_BINDADDR = "0.0.0.0:8009";
|
||||
};
|
||||
environmentFile = "${pkgs.writeText "matrixsecret" ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue