Allow server to be imported, deprioritize Jimbo. Those who nose.
This commit is contained in:
parent
5f0edcbb09
commit
d873588c59
|
@ -6,8 +6,8 @@
|
|||
};
|
||||
|
||||
config.domains = {
|
||||
jim1 = "jimbosfiles.com";
|
||||
jim2 = "nixfox.ca";
|
||||
p1 = "jimbosfiles.com";
|
||||
p2 = "nixfox.ca";
|
||||
corn = "freecorn1854.win";
|
||||
luna = "lunamoonlight.xyz";
|
||||
};
|
||||
|
|
10
modules/home/programs/gui/thunar/default.nix
Normal file
10
modules/home/programs/gui/thunar/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jimbo";
|
||||
userEmail = "jimbo@${config.domains.jim2}";
|
||||
userEmail = "jimbo@${config.domains.p2}";
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
./general
|
||||
#./server
|
||||
./server
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
enable = config.system.server.enable;
|
||||
protocol = "cloudflare";
|
||||
use = "web, web=https://ipinfo.io/ip";
|
||||
zone = "${config.domains.jim1}";
|
||||
zone = "${config.domains.p1}";
|
||||
username = "token";
|
||||
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";
|
||||
domains = [
|
||||
"${config.domains.jim1}"
|
||||
"*.${config.domains.jim1}"
|
||||
"sv.${config.domains.jim1}"
|
||||
"git.${config.domains.jim1}"
|
||||
"turn.${config.domains.jim1}"
|
||||
"dew.${config.domains.jim1}"
|
||||
"john.${config.domains.jim1}"
|
||||
"beta.${config.domains.jim1}"
|
||||
"rogue.${config.domains.jim1}"
|
||||
"${config.domains.p1}"
|
||||
"*.${config.domains.p1}"
|
||||
"sv.${config.domains.p1}"
|
||||
"git.${config.domains.p1}"
|
||||
"turn.${config.domains.p1}"
|
||||
"dew.${config.domains.p1}"
|
||||
"john.${config.domains.p1}"
|
||||
"beta.${config.domains.p1}"
|
||||
"rogue.${config.domains.p1}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
services.nextcloud = {
|
||||
enable = config.system.server.enable;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "cloud.${config.domains.jim1}";
|
||||
hostName = "cloud.${config.domains.p1}";
|
||||
datadir = "/mnt/nextcloud";
|
||||
https = true;
|
||||
config = {
|
||||
|
@ -14,13 +14,13 @@
|
|||
};
|
||||
settings = {
|
||||
trusted_proxies = [ "127.0.0.1" ];
|
||||
trusted_domains = [ "cloud.${config.domains.jim1}" ];
|
||||
trusted_domains = [ "cloud.${config.domains.p1}" ];
|
||||
overwriteprotocol = "https";
|
||||
mail_smtphost = "mx.${config.domains.jim1}";
|
||||
mail_domain = "${config.domains.jim1}";
|
||||
mail_smtphost = "mx.${config.domains.p1}";
|
||||
mail_domain = "${config.domains.p1}";
|
||||
mail_from_address = "noreply";
|
||||
mail_smtpauth = "true";
|
||||
mail_smtpname = "noreply@${config.domains.jim1}";
|
||||
mail_smtpname = "noreply@${config.domains.p1}";
|
||||
mail_smtppassword = config.secrets.noreplyPassword;
|
||||
mail_smtpmode = "smtp";
|
||||
mail_smtpport = 587;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."cloud.${config.domains.jim1}" = lib.mkIf config.services.nextcloud.enable {
|
||||
services.nginx.virtualHosts."cloud.${config.domains.p1}" = lib.mkIf config.services.nextcloud.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
onlySSL = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.nfs.server = {
|
||||
enable = config.system.server.enable;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
settings = {
|
||||
global = {
|
||||
"workgroup" = "WORKGROUP";
|
||||
"server string" = "JimSMB";
|
||||
"server string" = "NixSMB";
|
||||
"security" = "user";
|
||||
"hosts allow" = "${config.ips.localSpan}. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
|
@ -7,17 +7,17 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${config.domains.jim1}";
|
||||
ROOT_URL = "https://git.${config.domains.jim1}:443";
|
||||
DOMAIN = "git.${config.domains.p1}";
|
||||
ROOT_URL = "https://git.${config.domains.p1}:443";
|
||||
HTTP_PORT = 3110;
|
||||
SSH_PORT = 2299;
|
||||
START_SSH_SERVER = true;
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mx.${config.domains.jim1}";
|
||||
FROM = "Jimbo's Git <noreply@${config.domains.jim1}>";
|
||||
USER = "noreply@${config.domains.jim1}";
|
||||
SMTP_ADDR = "mx.${config.domains.p1}";
|
||||
FROM = "Jimbo's Git <noreply@${config.domains.p1}>";
|
||||
USER = "noreply@${config.domains.p1}";
|
||||
PASSWD = config.secrets.noreplyPassword;
|
||||
PROTOCOL = "smtps";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."git.${config.domains.jim1}" = lib.mkIf config.services.forgejo.enable {
|
||||
services.nginx.virtualHosts."git.${config.domains.p1}" = lib.mkIf config.services.forgejo.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
services.icecast = {
|
||||
enable = config.system.server.enable;
|
||||
listen.port = 265;
|
||||
hostname = "icecast.${config.domains.jim1}";
|
||||
hostname = "icecast.${config.domains.p1}";
|
||||
admin = {
|
||||
user = "jimbo";
|
||||
password = "${config.secrets.castAdminPass}";
|
||||
|
@ -19,7 +19,7 @@
|
|||
</authentication>
|
||||
|
||||
<location>Canada</location>
|
||||
<admin>contact@${config.domains.jim2}</admin>
|
||||
<admin>contact@${config.domains.p2}</admin>
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
radio="JimBops Radio",
|
||||
genre = "Anything",
|
||||
description="Music gathered by me, Jimbo.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimbops.opus",
|
||||
website="https://icecast.${config.domains.p1}",
|
||||
url="https://icecast.${config.domains.p1}/jimbops.opus",
|
||||
mount="jimbops.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
radio="Jimbo's Scrap",
|
||||
genre = "Scrapped",
|
||||
description="Music canned from the main radio.",
|
||||
website="https://icecast.${config.domains.jim1}",
|
||||
url="https://icecast.${config.domains.jim1}/jimscrapped.opus",
|
||||
website="https://icecast.${config.domains.p1}",
|
||||
url="https://icecast.${config.domains.p1}/jimscrapped.opus",
|
||||
mount="jimscrapped.opus",
|
||||
icy_metadata=["artist", "title"],
|
||||
public=true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."icecast.${config.domains.jim1}" = lib.mkIf services.icecast.enable {
|
||||
services.nginx.virtualHosts."icecast.${config.domains.p1}" = lib.mkIf config.services.icecast.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable mail host and services";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{
|
||||
services.roundcube = {
|
||||
enable = config.system.mailserver.enable;
|
||||
hostName = "mail.${config.domains.jim1}";
|
||||
hostName = "mail.${config.domains.p1}";
|
||||
extraConfig = ''
|
||||
$config['smtp_server'] = "tls://mx.${config.domains.jim1}";
|
||||
$config['smtp_server'] = "tls://mx.${config.domains.p1}";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
|
|
|
@ -8,37 +8,46 @@
|
|||
mailserver = rec {
|
||||
enable = config.system.mailserver.enable;
|
||||
domains = [
|
||||
"${config.domains.jim1}"
|
||||
"${config.domains.jim2}"
|
||||
"${config.domains.p1}"
|
||||
"${config.domains.p2}"
|
||||
"${config.domains.luna}"
|
||||
"${config.domains.corn}"
|
||||
];
|
||||
fqdn = "mx.${config.domains.jim1}";
|
||||
fqdn = "mx.${config.domains.p1}";
|
||||
certificateScheme = "acme-nginx";
|
||||
localDnsResolver = false;
|
||||
redis.port = 1515;
|
||||
|
||||
dmarcReporting = {
|
||||
enable = true;
|
||||
domain = "${config.domains.jim1}";
|
||||
domain = "${config.domains.p1}";
|
||||
localpart = "noreply";
|
||||
organizationName = "Jimbo's Files";
|
||||
};
|
||||
|
||||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"noreply@${config.domains.jim1}" = {
|
||||
"noreply@${config.domains.p1}" = {
|
||||
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||
sendOnly = true;
|
||||
};
|
||||
"jimbo@${config.domains.jim2}" = {
|
||||
"jimbo@${config.domains.p2}" = {
|
||||
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
||||
aliases = [
|
||||
"jimbo@${config.domains.jim1}"
|
||||
"james@${config.domains.jim1}"
|
||||
"james@${config.domains.jim2}"
|
||||
"contact@${config.domains.jim1}"
|
||||
"contact@${config.domains.jim2}"
|
||||
"jimbo@${config.domains.p1}"
|
||||
"james@${config.domains.p1}"
|
||||
"james@${config.domains.p2}"
|
||||
"contact@${config.domains.p1}"
|
||||
"contact@${config.domains.p2}"
|
||||
];
|
||||
};
|
||||
"vicee@${config.domains.p2}" = {
|
||||
hashedPasswordFile = pkgs.writeText "vicee" config.secrets.jimboMailHash;
|
||||
aliases = [
|
||||
"vice@${config.domains.p2}"
|
||||
"yara@${config.domains.p2}"
|
||||
"yaralis@${config.domains.p2}"
|
||||
"contact@${config.domains.p2}"
|
||||
];
|
||||
};
|
||||
"luna@${config.domains.luna}" = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."mx.${config.domains.jim1}" = lib.mkIf config.mailserver.enable {
|
||||
services.nginx.virtualHosts."mx.${config.domains.p1}" = lib.mkIf config.mailserver.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ minecraft, ... }:
|
||||
{ minecraft, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
minecraft.nixosModules.minecraft-servers
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.mysql = {
|
||||
enable = config.system.server.enable;
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./rtmp
|
||||
./virtualhosts
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = config.system.server.enable;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
config = lib.mkIf config.system.server.enable {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,31 +1,40 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
package = (pkgs.nginx.override {
|
||||
modules = with pkgs.nginxModules; [ rtmp ];
|
||||
});
|
||||
appendConfig = ''
|
||||
rtmp {
|
||||
server {
|
||||
listen 1935;
|
||||
chunk_size 4096;
|
||||
allow publish all;
|
||||
application stream {
|
||||
record off;
|
||||
live on;
|
||||
allow play all;
|
||||
hls on;
|
||||
hls_path /var/www/Jimbo-Landing-Page/streams/hls/;
|
||||
hls_fragment_naming system;
|
||||
hls_fragment 3;
|
||||
hls_playlist_length 40;
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
options.services.nginx.rtmp = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.nginx.serviceConfig = {
|
||||
ReadWritePaths = [ "/var/www/Jimbo-Landing-Page/streams/hls/" ];
|
||||
config = lib.mkIf config.services.nginx.rtmp.enable {
|
||||
services.nginx = {
|
||||
package = (pkgs.nginx.override {
|
||||
modules = with pkgs.nginxModules; [ rtmp ];
|
||||
});
|
||||
appendConfig = ''
|
||||
rtmp {
|
||||
server {
|
||||
listen 1935;
|
||||
chunk_size 4096;
|
||||
allow publish all;
|
||||
application stream {
|
||||
record off;
|
||||
live on;
|
||||
allow play all;
|
||||
hls on;
|
||||
hls_path /var/www/Jimbo-Landing-Page/streams/hls/;
|
||||
hls_fragment_naming system;
|
||||
hls_fragment 3;
|
||||
hls_playlist_length 40;
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.nginx.serviceConfig = {
|
||||
ReadWritePaths = [ "/var/www/Jimbo-Landing-Page/streams/hls/" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./jim1
|
||||
./p1
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."${config.domains.p1}" = lib.mkIf config.system.server.enable{
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "/var/www/Jimbo-Landing-Page";
|
||||
root = "/var/www/landing-page";
|
||||
locations = {
|
||||
"/.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '
|
||||
{
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix.${config.domains.jim1}"
|
||||
"base_url": "https://matrix.${config.domains.p1}"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://matrix.org"
|
||||
},
|
||||
"org.matrix.msc3575.proxy": {
|
||||
"url": "https://matrix.${config.domains.jim1}"
|
||||
"url": "https://matrix.${config.domains.p1}"
|
||||
}
|
||||
}
|
||||
';
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
"/.well-known/matrix/server".extraConfig = ''
|
||||
default_type application/json;
|
||||
return 200 '{ "m.server": "matrix.${config.domains.jim1}:443" }';
|
||||
return 200 '{ "m.server": "matrix.${config.domains.p1}:443" }';
|
||||
'';
|
||||
};
|
||||
};
|
|
@ -7,11 +7,11 @@
|
|||
nginx.enable = true;
|
||||
database.createLocally = true;
|
||||
settings = {
|
||||
hostname = "lemmy.${config.domains.jim1}";
|
||||
hostname = "lemmy.${config.domains.p1}";
|
||||
email = {
|
||||
smtp_server = "mx.${config.domains.jim1}:587";
|
||||
smtp_login = "noreply@${config.domains.jim1}";
|
||||
smtp_from_address = "Jimbo's Lemmy <noreply@${config.domains.jim1}>";
|
||||
smtp_server = "mx.${config.domains.p1}:587";
|
||||
smtp_login = "noreply@${config.domains.p1}";
|
||||
smtp_from_address = "Jimbo's Lemmy <noreply@${config.domains.p1}>";
|
||||
smtp_password = config.secrets.noreplyPassword;
|
||||
tls_type = "starttls";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."lemmy.${config.domains.jim1}" = lib.mkIf config.services.lemmy.enable {
|
||||
services.nginx.virtualHosts."lemmy.${config.domains.p1}" = lib.mkIf config.services.lemmy.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
{
|
||||
services.mastodon = {
|
||||
enable = config.system.server.enable;
|
||||
localDomain = "social.${config.domains.jim1}";
|
||||
localDomain = "social.${config.domains.p1}";
|
||||
streamingProcesses = 4;
|
||||
configureNginx = true;
|
||||
smtp = {
|
||||
createLocally = false;
|
||||
host = "mx.${config.domains.jim1}";
|
||||
host = "mx.${config.domains.p1}";
|
||||
port = 587;
|
||||
authenticate = true;
|
||||
fromAddress = "Jimbo's Mastodon <noreply@${config.domains.jim1}>";
|
||||
user = "noreply@${config.domains.jim1}";
|
||||
fromAddress = "Jimbo's Mastodon <noreply@${config.domains.p1}>";
|
||||
user = "noreply@${config.domains.p1}";
|
||||
passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.noreplyPassword;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,41 +1,43 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services = {
|
||||
coturn = {
|
||||
enable = true;
|
||||
no-cli = true;
|
||||
no-tcp-relay = true;
|
||||
min-port = 49000;
|
||||
max-port = 50000;
|
||||
use-auth-secret = true;
|
||||
static-auth-secret = config.secrets.coturnSecret;
|
||||
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";
|
||||
config = lib.mkIf config.services.matrix-synapse.enable {
|
||||
services = {
|
||||
coturn = {
|
||||
enable = true;
|
||||
no-cli = true;
|
||||
no-tcp-relay = true;
|
||||
min-port = 49000;
|
||||
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";
|
||||
};
|
||||
|
||||
# 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_shared_secret = config.secrets.coturnSecret;
|
||||
turn_user_lifetime = "1h";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable coturn on Synapse
|
||||
matrix-synapse.settings = {
|
||||
turn_uris = [
|
||||
"turn:turn.${config.domains.jim1}:3478?transport=udp"
|
||||
"turn:turn.${config.domains.jim1}:3478?transport=tcp"
|
||||
# Open coturn ports
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
turn_shared_secret = config.secrets.coturnSecret;
|
||||
turn_user_lifetime = "1h";
|
||||
allowedUDPPortRanges = [{
|
||||
from = config.services.coturn.min-port;
|
||||
to = config.services.coturn.max-port;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# Open coturn ports
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
allowedUDPPortRanges = [{
|
||||
from = config.services.coturn.min-port;
|
||||
to = config.services.coturn.max-port;
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."turn.${config.domains.jim1}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
ssl = false;
|
||||
}];
|
||||
locations."/".proxyPass = "http://127.0.0.1:1380";
|
||||
};
|
||||
config = lib.mkIf config.services.coturn.enable {
|
||||
services.nginx.virtualHosts."turn.${config.domains.p1}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
ssl = false;
|
||||
}];
|
||||
locations."/".proxyPass = "http://127.0.0.1:1380";
|
||||
};
|
||||
|
||||
security.acme.certs = {
|
||||
"turn.${config.domains.jim1}" = {
|
||||
group = "turnserver";
|
||||
postRun = "systemctl restart coturn.service";
|
||||
security.acme.certs = {
|
||||
"turn.${config.domains.p1}" = {
|
||||
group = "turnserver";
|
||||
postRun = "systemctl restart coturn.service";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
imports = [
|
||||
./coturn
|
||||
./element
|
||||
./slidingsync
|
||||
./synapse
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config."m.homeserver" = {
|
||||
base_url = "https://matrix.${config.domains.jim1}";
|
||||
server_name = "matrix.${config.domains.jim1}";
|
||||
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}";
|
||||
};
|
||||
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";
|
||||
};
|
||||
embedded_pages = {
|
||||
home_url = "https://www.${config.domains.p1}/";
|
||||
};
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
default_theme = "dark";
|
||||
};
|
||||
branding = {
|
||||
#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.domains.jim1}/";
|
||||
};
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
default_theme = "dark";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."chat.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."chat.${config.domains.p1}" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "${pkgs.element-web}";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.matrix-sliding-sync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
SYNCV3_SERVER = "https://matrix.${config.domains.jim1}";
|
||||
SYNCV3_BINDADDR = "0.0.0.0:8009";
|
||||
};
|
||||
environmentFile = pkgs.writeText "matrixsecret" ''
|
||||
SYNCV3_SECRET=${config.secrets.matrixSecret}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
enable = config.system.server.enable;
|
||||
settings = {
|
||||
server_name = "${config.domains.jim1}";
|
||||
public_baseurl = "https://matrix.${config.domains.jim1}";
|
||||
server_name = "${config.domains.p1}";
|
||||
public_baseurl = "https://matrix.${config.domains.p1}";
|
||||
suppress_key_server_warning = true;
|
||||
|
||||
listeners = [
|
||||
|
@ -19,9 +19,9 @@
|
|||
];
|
||||
|
||||
email = {
|
||||
notif_from = "Jimbo's Matrix <noreply@${config.domains.jim1}>";
|
||||
smtp_host = "mx.${config.domains.jim1}";
|
||||
smtp_user = "noreply@${config.domains.jim1}";
|
||||
notif_from = "Jimbo's Matrix <noreply@${config.domains.p1}>";
|
||||
smtp_host = "mx.${config.domains.p1}";
|
||||
smtp_user = "noreply@${config.domains.p1}";
|
||||
smtp_pass = config.secrets.noreplyPassword;
|
||||
enable_tls = true;
|
||||
smtp_port = 587;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."matrix.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."matrix.${config.domains.p1}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
services.owncast = {
|
||||
enable = true;
|
||||
enable = config.system.server.enable;
|
||||
port = 8060;
|
||||
rtmp-port = 1945;
|
||||
listen = "0.0.0.0";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."live.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."live.${config.domains.p1}" = lib.mkIf config.services.owncast.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
imports = [ ./nginx ];
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
enable = config.system.server.enable;
|
||||
credentialsFile = pkgs.writeText "credentials" config.secrets.transmissionCredFile;
|
||||
openPeerPorts = true;
|
||||
settings.rpc-authentication-required = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."torrent.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."torrent.${config.domains.p1}" = config.services.transmission.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
imports = [ ./nginx ];
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
enable = config.system.server.enable;
|
||||
config = {
|
||||
DOMAIN = "https://warden.${config.domains.jim1}";
|
||||
DOMAIN = "https://warden.${config.domains.p1}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_PORT = 8222;
|
||||
ROCKET_LOG = "critical";
|
||||
|
||||
# Smtp email
|
||||
SMTP_HOST = "mx.${config.domains.jim1}";
|
||||
SMTP_FROM = "noreply@${config.domains.jim1}";
|
||||
SMTP_HOST = "mx.${config.domains.p1}";
|
||||
SMTP_FROM = "noreply@${config.domains.p1}";
|
||||
SMTP_FROM_NAME = "Vaultwarden";
|
||||
SMTP_USERNAME = "noreply@${config.domains.jim1}";
|
||||
SMTP_USERNAME = "noreply@${config.domains.p1}";
|
||||
SMTP_PASSWORD = config.secrets.noreplyPassword;
|
||||
SMTP_SECURITY = "starttls";
|
||||
SMTP_PORT = 587;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."warden.${config.domains.jim1}" = {
|
||||
services.nginx.virtualHosts."warden.${config.domains.p1}" = lib.mkIf config.services.vaultwarden.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
Loading…
Reference in a new issue