Devariable domains
This commit is contained in:
parent
2c4749f2cc
commit
984b12819e
55 changed files with 152 additions and 179 deletions
|
@ -3,16 +3,16 @@
|
|||
config = lib.mkIf config.system.socialserver.enable {
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
localDomain = "social.${config.domains.p2}";
|
||||
localDomain = "social.nixfox.ca";
|
||||
streamingProcesses = 4;
|
||||
configureNginx = true;
|
||||
smtp = {
|
||||
createLocally = false;
|
||||
host = "mx.${config.domains.p2}";
|
||||
host = "mx.nixfox.ca";
|
||||
port = 587;
|
||||
authenticate = true;
|
||||
fromAddress = "NixFox Mastodon <noreply@${config.domains.p2}>";
|
||||
user = "noreply@${config.domains.p2}";
|
||||
fromAddress = "NixFox Mastodon <noreply@nixfox.ca>";
|
||||
user = "noreply@nixfox.ca";
|
||||
passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.noreplyPassword;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -12,23 +12,23 @@
|
|||
max-port = 50000;
|
||||
use-auth-secret = true;
|
||||
static-auth-secret = config.secrets.coturnSecret;
|
||||
realm = "turn.${config.domains.p1}";
|
||||
cert = "/var/lib/acme/turn.${config.domains.p1}.com/fullchain.pem";
|
||||
pkey = "/var/lib/acme/turn.${config.domains.p1}.com/key.pem";
|
||||
realm = "turn.jimbosfiles.com";
|
||||
cert = "/var/lib/acme/turn.jimbosfiles.com/fullchain.pem";
|
||||
pkey = "/var/lib/acme/turn.jimbosfiles.com/key.pem";
|
||||
};
|
||||
|
||||
# Enable coturn on Synapse
|
||||
matrix-synapse.settings = {
|
||||
turn_uris = [
|
||||
"turn:turn.${config.domains.p1}:3478?transport=udp"
|
||||
"turn:turn.${config.domains.p1}:3478?transport=tcp"
|
||||
"turn:turn.jimbosfiles.com:3478?transport=udp"
|
||||
"turn:turn.jimbosfiles.com:3478?transport=tcp"
|
||||
];
|
||||
turn_shared_secret = config.secrets.coturnSecret;
|
||||
turn_user_lifetime = "1h";
|
||||
};
|
||||
|
||||
# Sync the IP to Cloudflare
|
||||
ddclient.domains = [ "git.${config.domains.p2}" ];
|
||||
ddclient.domains = [ "turn.jimbosfiles.com" ];
|
||||
};
|
||||
|
||||
# Open coturn ports
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf config.services.coturn.enable {
|
||||
services.nginx.virtualHosts."turn.${config.domains.p1}" = {
|
||||
services.nginx.virtualHosts."turn.jimbosfiles.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
listen = [{
|
||||
|
@ -13,7 +13,7 @@
|
|||
};
|
||||
|
||||
security.acme.certs = {
|
||||
"turn.${config.domains.p1}" = {
|
||||
"turn.jimbosfiles.com" = {
|
||||
group = "turnserver";
|
||||
postRun = "systemctl restart coturn.service";
|
||||
};
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
config = lib.mkIf config.services.matrix-synapse.enable {
|
||||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config."m.homeserver" = {
|
||||
base_url = "https://matrix.${config.domains.p1}";
|
||||
server_name = "matrix.${config.domains.p1}";
|
||||
base_url = "https://matrix.jimbosfiles.com";
|
||||
server_name = "matrix.jimbosfiles.com";
|
||||
};
|
||||
branding = {
|
||||
#welcome_background_url = "https://staging.${config.domains.p1}/images/backgrounds/template-background.png";
|
||||
#auth_header_logo_url = "https://staging.${config.domains.p1}/images/logos/template-logo.png";
|
||||
#welcome_background_url = "https://staging.jimbosfiles.com/images/backgrounds/template-background.png";
|
||||
#auth_header_logo_url = "https://staging.jimbosfiles.com/images/logos/template-logo.png";
|
||||
};
|
||||
embedded_pages = {
|
||||
home_url = "https://www.${config.domains.p1}/";
|
||||
home_url = "https://www.jimbosfiles.com/";
|
||||
};
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."chat.${config.domains.p2}" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
services.nginx.virtualHosts."chat.nixfox.ca" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "${pkgs.element-web}";
|
||||
|
|
|
@ -8,31 +8,32 @@
|
|||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server_name = "${config.domains.p1}";
|
||||
public_baseurl = "https://matrix.${config.domains.p1}";
|
||||
server_name = "jimbosfiles.com";
|
||||
public_baseurl = "https://matrix.jimbosfiles.com";
|
||||
suppress_key_server_warning = true;
|
||||
|
||||
listeners = [
|
||||
{
|
||||
port = 8008;
|
||||
bind_addresses = [ "::" "0.0.0.0" ];
|
||||
resources = [{
|
||||
compress = true;
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
];
|
||||
}];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
}
|
||||
];
|
||||
listeners = [{
|
||||
port = 8008;
|
||||
bind_addresses = [
|
||||
"::"
|
||||
"0.0.0.0"
|
||||
];
|
||||
resources = [{
|
||||
compress = true;
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
];
|
||||
}];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
}];
|
||||
|
||||
email = {
|
||||
notif_from = "NixFox Matrix <noreply@${config.domains.p2}>";
|
||||
smtp_host = "mx.${config.domains.p2}";
|
||||
smtp_user = "noreply@${config.domains.p2}";
|
||||
notif_from = "NixFox Matrix <noreply@nixfox.ca>";
|
||||
smtp_host = "mx.nixfox.ca";
|
||||
smtp_user = "noreply@nixfox.ca";
|
||||
smtp_pass = config.secrets.noreplyPassword;
|
||||
enable_tls = true;
|
||||
smtp_port = 587;
|
||||
|
@ -42,27 +43,11 @@
|
|||
# Disable registration without email
|
||||
registrations_require_3pid = [ "email" ];
|
||||
|
||||
# Allow only this range of emails
|
||||
allowed_local_3pids = [
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@nixfox\.ca$'';
|
||||
}
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@freecorn1854\.win$'';
|
||||
}
|
||||
{
|
||||
medium = "email";
|
||||
pattern = ''^[^@]+@lunamoonlight\.xyz$'';
|
||||
}
|
||||
];
|
||||
|
||||
# Set the type of database
|
||||
database.name = "sqlite3";
|
||||
|
||||
# Allow account registration
|
||||
enable_registration = true;
|
||||
#enable_registration = true;
|
||||
|
||||
# General settings
|
||||
url_preview_enabled = true;
|
||||
|
@ -71,8 +56,7 @@
|
|||
burst_count = 15;
|
||||
};
|
||||
};
|
||||
environment.persistence."/persist".directories = [
|
||||
"/var/lib/matrix-synapse"
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/matrix-synapse" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."matrix.${config.domains.p1}" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
services.nginx.virtualHosts."matrix.jimbosfiles.com" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."live.${config.domains.p2}" = lib.mkIf config.services.owncast.enable {
|
||||
services.nginx.virtualHosts."live.nixfox.ca" = lib.mkIf config.services.owncast.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue