Allow server to be imported, deprioritize Jimbo. Those who nose.

This commit is contained in:
Jimbo 2025-01-01 02:02:00 -05:00
parent 5f0edcbb09
commit d873588c59
42 changed files with 228 additions and 207 deletions

View file

@ -6,8 +6,8 @@
}; };
config.domains = { config.domains = {
jim1 = "jimbosfiles.com"; p1 = "jimbosfiles.com";
jim2 = "nixfox.ca"; p2 = "nixfox.ca";
corn = "freecorn1854.win"; corn = "freecorn1854.win";
luna = "lunamoonlight.xyz"; luna = "lunamoonlight.xyz";
}; };

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
}

View file

@ -3,7 +3,7 @@
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Jimbo"; userName = "Jimbo";
userEmail = "jimbo@${config.domains.jim2}"; userEmail = "jimbo@${config.domains.p2}";
}; };
programs.lazygit.enable = true; programs.lazygit.enable = true;

View file

@ -2,6 +2,6 @@
{ {
imports = [ imports = [
./general ./general
#./server ./server
]; ];
} }

View file

@ -4,19 +4,19 @@
enable = config.system.server.enable; enable = config.system.server.enable;
protocol = "cloudflare"; protocol = "cloudflare";
use = "web, web=https://ipinfo.io/ip"; use = "web, web=https://ipinfo.io/ip";
zone = "${config.domains.jim1}"; zone = "${config.domains.p1}";
username = "token"; username = "token";
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}"; passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";
domains = [ domains = [
"${config.domains.jim1}" "${config.domains.p1}"
"*.${config.domains.jim1}" "*.${config.domains.p1}"
"sv.${config.domains.jim1}" "sv.${config.domains.p1}"
"git.${config.domains.jim1}" "git.${config.domains.p1}"
"turn.${config.domains.jim1}" "turn.${config.domains.p1}"
"dew.${config.domains.jim1}" "dew.${config.domains.p1}"
"john.${config.domains.jim1}" "john.${config.domains.p1}"
"beta.${config.domains.jim1}" "beta.${config.domains.p1}"
"rogue.${config.domains.jim1}" "rogue.${config.domains.p1}"
]; ];
}; };
} }

View file

@ -5,7 +5,7 @@
services.nextcloud = { services.nextcloud = {
enable = config.system.server.enable; enable = config.system.server.enable;
package = pkgs.nextcloud30; package = pkgs.nextcloud30;
hostName = "cloud.${config.domains.jim1}"; hostName = "cloud.${config.domains.p1}";
datadir = "/mnt/nextcloud"; datadir = "/mnt/nextcloud";
https = true; https = true;
config = { config = {
@ -14,13 +14,13 @@
}; };
settings = { settings = {
trusted_proxies = [ "127.0.0.1" ]; trusted_proxies = [ "127.0.0.1" ];
trusted_domains = [ "cloud.${config.domains.jim1}" ]; trusted_domains = [ "cloud.${config.domains.p1}" ];
overwriteprotocol = "https"; overwriteprotocol = "https";
mail_smtphost = "mx.${config.domains.jim1}"; mail_smtphost = "mx.${config.domains.p1}";
mail_domain = "${config.domains.jim1}"; mail_domain = "${config.domains.p1}";
mail_from_address = "noreply"; mail_from_address = "noreply";
mail_smtpauth = "true"; mail_smtpauth = "true";
mail_smtpname = "noreply@${config.domains.jim1}"; mail_smtpname = "noreply@${config.domains.p1}";
mail_smtppassword = config.secrets.noreplyPassword; mail_smtppassword = config.secrets.noreplyPassword;
mail_smtpmode = "smtp"; mail_smtpmode = "smtp";
mail_smtpport = 587; mail_smtpport = 587;

View file

@ -1,6 +1,6 @@
{ lib, config, ... }: { 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; enableACME = true;
addSSL = true; addSSL = true;
onlySSL = true; onlySSL = true;

View file

@ -1,4 +1,4 @@
{ ... }: { config, ... }:
{ {
services.nfs.server = { services.nfs.server = {
enable = config.system.server.enable; enable = config.system.server.enable;

View file

@ -8,7 +8,7 @@
settings = { settings = {
global = { global = {
"workgroup" = "WORKGROUP"; "workgroup" = "WORKGROUP";
"server string" = "JimSMB"; "server string" = "NixSMB";
"security" = "user"; "security" = "user";
"hosts allow" = "${config.ips.localSpan}. 127.0.0.1 localhost"; "hosts allow" = "${config.ips.localSpan}. 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0"; "hosts deny" = "0.0.0.0/0";

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, lib, ... }:
{ {
imports = [ ./nginx ]; imports = [ ./nginx ];
@ -7,17 +7,17 @@
enable = true; enable = true;
settings = { settings = {
server = { server = {
DOMAIN = "git.${config.domains.jim1}"; DOMAIN = "git.${config.domains.p1}";
ROOT_URL = "https://git.${config.domains.jim1}:443"; ROOT_URL = "https://git.${config.domains.p1}:443";
HTTP_PORT = 3110; HTTP_PORT = 3110;
SSH_PORT = 2299; SSH_PORT = 2299;
START_SSH_SERVER = true; START_SSH_SERVER = true;
}; };
mailer = { mailer = {
ENABLED = true; ENABLED = true;
SMTP_ADDR = "mx.${config.domains.jim1}"; SMTP_ADDR = "mx.${config.domains.p1}";
FROM = "Jimbo's Git <noreply@${config.domains.jim1}>"; FROM = "Jimbo's Git <noreply@${config.domains.p1}>";
USER = "noreply@${config.domains.jim1}"; USER = "noreply@${config.domains.p1}";
PASSWD = config.secrets.noreplyPassword; PASSWD = config.secrets.noreplyPassword;
PROTOCOL = "smtps"; PROTOCOL = "smtps";
}; };

View file

@ -1,6 +1,6 @@
{ lib, config, ... }: { 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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -8,7 +8,7 @@
services.icecast = { services.icecast = {
enable = config.system.server.enable; enable = config.system.server.enable;
listen.port = 265; listen.port = 265;
hostname = "icecast.${config.domains.jim1}"; hostname = "icecast.${config.domains.p1}";
admin = { admin = {
user = "jimbo"; user = "jimbo";
password = "${config.secrets.castAdminPass}"; password = "${config.secrets.castAdminPass}";
@ -19,7 +19,7 @@
</authentication> </authentication>
<location>Canada</location> <location>Canada</location>
<admin>contact@${config.domains.jim2}</admin> <admin>contact@${config.domains.p2}</admin>
''; '';
}; };
} }

View file

@ -19,8 +19,8 @@
radio="JimBops Radio", radio="JimBops Radio",
genre = "Anything", genre = "Anything",
description="Music gathered by me, Jimbo.", description="Music gathered by me, Jimbo.",
website="https://icecast.${config.domains.jim1}", website="https://icecast.${config.domains.p1}",
url="https://icecast.${config.domains.jim1}/jimbops.opus", url="https://icecast.${config.domains.p1}/jimbops.opus",
mount="jimbops.opus", mount="jimbops.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,

View file

@ -19,8 +19,8 @@
radio="Jimbo's Scrap", radio="Jimbo's Scrap",
genre = "Scrapped", genre = "Scrapped",
description="Music canned from the main radio.", description="Music canned from the main radio.",
website="https://icecast.${config.domains.jim1}", website="https://icecast.${config.domains.p1}",
url="https://icecast.${config.domains.jim1}/jimscrapped.opus", url="https://icecast.${config.domains.p1}/jimscrapped.opus",
mount="jimscrapped.opus", mount="jimscrapped.opus",
icy_metadata=["artist", "title"], icy_metadata=["artist", "title"],
public=true, public=true,

View file

@ -1,6 +1,6 @@
{ lib, config, ... }: { 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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -4,7 +4,6 @@
enable = lib.mkOption { enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Enable mail host and services";
}; };
}; };

View file

@ -2,9 +2,9 @@
{ {
services.roundcube = { services.roundcube = {
enable = config.system.mailserver.enable; enable = config.system.mailserver.enable;
hostName = "mail.${config.domains.jim1}"; hostName = "mail.${config.domains.p1}";
extraConfig = '' extraConfig = ''
$config['smtp_server'] = "tls://mx.${config.domains.jim1}"; $config['smtp_server'] = "tls://mx.${config.domains.p1}";
$config['smtp_user'] = "%u"; $config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p"; $config['smtp_pass'] = "%p";
''; '';

View file

@ -8,37 +8,46 @@
mailserver = rec { mailserver = rec {
enable = config.system.mailserver.enable; enable = config.system.mailserver.enable;
domains = [ domains = [
"${config.domains.jim1}" "${config.domains.p1}"
"${config.domains.jim2}" "${config.domains.p2}"
"${config.domains.luna}" "${config.domains.luna}"
"${config.domains.corn}" "${config.domains.corn}"
]; ];
fqdn = "mx.${config.domains.jim1}"; fqdn = "mx.${config.domains.p1}";
certificateScheme = "acme-nginx"; certificateScheme = "acme-nginx";
localDnsResolver = false; localDnsResolver = false;
redis.port = 1515; redis.port = 1515;
dmarcReporting = { dmarcReporting = {
enable = true; enable = true;
domain = "${config.domains.jim1}"; domain = "${config.domains.p1}";
localpart = "noreply"; localpart = "noreply";
organizationName = "Jimbo's Files"; organizationName = "Jimbo's Files";
}; };
# Passwords made with 'mkpasswd -sm bcrypt' # Passwords made with 'mkpasswd -sm bcrypt'
loginAccounts = { loginAccounts = {
"noreply@${config.domains.jim1}" = { "noreply@${config.domains.p1}" = {
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash; hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
sendOnly = true; sendOnly = true;
}; };
"jimbo@${config.domains.jim2}" = { "jimbo@${config.domains.p2}" = {
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash; hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
aliases = [ aliases = [
"jimbo@${config.domains.jim1}" "jimbo@${config.domains.p1}"
"james@${config.domains.jim1}" "james@${config.domains.p1}"
"james@${config.domains.jim2}" "james@${config.domains.p2}"
"contact@${config.domains.jim1}" "contact@${config.domains.p1}"
"contact@${config.domains.jim2}" "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}" = { "luna@${config.domains.luna}" = {

View file

@ -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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -1,4 +1,4 @@
{ minecraft, ... }: { minecraft, config, ... }:
{ {
imports = [ imports = [
minecraft.nixosModules.minecraft-servers minecraft.nixosModules.minecraft-servers

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
services.mysql = { services.mysql = {
enable = config.system.server.enable; enable = config.system.server.enable;

View file

@ -1,20 +1,22 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
imports = [ imports = [
./rtmp ./rtmp
./virtualhosts ./virtualhosts
]; ];
services.nginx = { config = lib.mkIf config.system.server.enable {
enable = config.system.server.enable; services.nginx = {
recommendedTlsSettings = true; enable = true;
recommendedOptimisation = true; recommendedTlsSettings = true;
recommendedGzipSettings = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedGzipSettings = true;
}; recommendedProxySettings = true;
};
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443 443
]; ];
};
} }

View file

@ -1,31 +1,40 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
services.nginx = { options.services.nginx.rtmp = {
package = (pkgs.nginx.override { enable = lib.mkOption {
modules = with pkgs.nginxModules; [ rtmp ]; type = lib.types.bool;
}); default = false;
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 = { config = lib.mkIf config.services.nginx.rtmp.enable {
ReadWritePaths = [ "/var/www/Jimbo-Landing-Page/streams/hls/" ]; 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/" ];
};
}; };
} }

View file

@ -1,6 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./jim1 ./p1
]; ];
} }

View file

@ -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; enableACME = true;
addSSL = true; addSSL = true;
root = "/var/www/Jimbo-Landing-Page"; root = "/var/www/landing-page";
locations = { locations = {
"/.well-known/matrix/client".extraConfig = '' "/.well-known/matrix/client".extraConfig = ''
default_type application/json; default_type application/json;
return 200 ' return 200 '
{ {
"m.homeserver": { "m.homeserver": {
"base_url": "https://matrix.${config.domains.jim1}" "base_url": "https://matrix.${config.domains.p1}"
}, },
"m.identity_server": { "m.identity_server": {
"base_url": "https://matrix.org" "base_url": "https://matrix.org"
}, },
"org.matrix.msc3575.proxy": { "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 = '' "/.well-known/matrix/server".extraConfig = ''
default_type application/json; default_type application/json;
return 200 '{ "m.server": "matrix.${config.domains.jim1}:443" }'; return 200 '{ "m.server": "matrix.${config.domains.p1}:443" }';
''; '';
}; };
}; };

View file

@ -7,11 +7,11 @@
nginx.enable = true; nginx.enable = true;
database.createLocally = true; database.createLocally = true;
settings = { settings = {
hostname = "lemmy.${config.domains.jim1}"; hostname = "lemmy.${config.domains.p1}";
email = { email = {
smtp_server = "mx.${config.domains.jim1}:587"; smtp_server = "mx.${config.domains.p1}:587";
smtp_login = "noreply@${config.domains.jim1}"; smtp_login = "noreply@${config.domains.p1}";
smtp_from_address = "Jimbo's Lemmy <noreply@${config.domains.jim1}>"; smtp_from_address = "Jimbo's Lemmy <noreply@${config.domains.p1}>";
smtp_password = config.secrets.noreplyPassword; smtp_password = config.secrets.noreplyPassword;
tls_type = "starttls"; tls_type = "starttls";
}; };

View file

@ -1,6 +1,6 @@
{ config, lib, ... }: { 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; enableACME = true;
forceSSL = true; forceSSL = true;
}; };

View file

@ -2,16 +2,16 @@
{ {
services.mastodon = { services.mastodon = {
enable = config.system.server.enable; enable = config.system.server.enable;
localDomain = "social.${config.domains.jim1}"; localDomain = "social.${config.domains.p1}";
streamingProcesses = 4; streamingProcesses = 4;
configureNginx = true; configureNginx = true;
smtp = { smtp = {
createLocally = false; createLocally = false;
host = "mx.${config.domains.jim1}"; host = "mx.${config.domains.p1}";
port = 587; port = 587;
authenticate = true; authenticate = true;
fromAddress = "Jimbo's Mastodon <noreply@${config.domains.jim1}>"; fromAddress = "Jimbo's Mastodon <noreply@${config.domains.p1}>";
user = "noreply@${config.domains.jim1}"; user = "noreply@${config.domains.p1}";
passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.noreplyPassword; passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.noreplyPassword;
}; };
}; };

View file

@ -1,41 +1,43 @@
{ config, ... }: { config, lib, ... }:
{ {
imports = [ ./nginx ]; imports = [ ./nginx ];
services = { config = lib.mkIf config.services.matrix-synapse.enable {
coturn = { services = {
enable = true; coturn = {
no-cli = true; enable = true;
no-tcp-relay = true; no-cli = true;
min-port = 49000; no-tcp-relay = true;
max-port = 50000; min-port = 49000;
use-auth-secret = true; max-port = 50000;
static-auth-secret = config.secrets.coturnSecret; use-auth-secret = true;
realm = "turn.${config.domains.jim1}"; static-auth-secret = config.secrets.coturnSecret;
cert = "/var/lib/acme/turn.${config.domains.jim1}.com/fullchain.pem"; realm = "turn.${config.domains.p1}";
pkey = "/var/lib/acme/turn.${config.domains.jim1}.com/key.pem"; 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 # Open coturn ports
matrix-synapse.settings = { networking.firewall = {
turn_uris = [ allowedUDPPorts = [
"turn:turn.${config.domains.jim1}:3478?transport=udp" 3478
"turn:turn.${config.domains.jim1}:3478?transport=tcp" 5349
]; ];
turn_shared_secret = config.secrets.coturnSecret; allowedUDPPortRanges = [{
turn_user_lifetime = "1h"; 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;
}];
};
} }

View file

@ -1,20 +1,22 @@
{ config, ... }: { config, lib, ... }:
{ {
services.nginx.virtualHosts."turn.${config.domains.jim1}" = { config = lib.mkIf config.services.coturn.enable {
enableACME = true; services.nginx.virtualHosts."turn.${config.domains.p1}" = {
forceSSL = true; enableACME = true;
listen = [{ forceSSL = true;
addr = "0.0.0.0"; listen = [{
port = 80; addr = "0.0.0.0";
ssl = false; port = 80;
}]; ssl = false;
locations."/".proxyPass = "http://127.0.0.1:1380"; }];
}; locations."/".proxyPass = "http://127.0.0.1:1380";
};
security.acme.certs = { security.acme.certs = {
"turn.${config.domains.jim1}" = { "turn.${config.domains.p1}" = {
group = "turnserver"; group = "turnserver";
postRun = "systemctl restart coturn.service"; postRun = "systemctl restart coturn.service";
};
}; };
}; };
} }

View file

@ -3,7 +3,6 @@
imports = [ imports = [
./coturn ./coturn
./element ./element
./slidingsync
./synapse ./synapse
]; ];
} }

View file

@ -1,21 +1,23 @@
{ config, ... }: { config, lib, ... }:
{ {
imports = [ ./nginx ]; imports = [ ./nginx ];
nixpkgs.config.element-web.conf = { config = lib.mkIf config.services.matrix-synapse.enable {
default_server_config."m.homeserver" = { nixpkgs.config.element-web.conf = {
base_url = "https://matrix.${config.domains.jim1}"; default_server_config."m.homeserver" = {
server_name = "matrix.${config.domains.jim1}"; 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";
}; };
} }

View file

@ -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; enableACME = true;
addSSL = true; addSSL = true;
root = "${pkgs.element-web}"; root = "${pkgs.element-web}";

View file

@ -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}
'';
};
}

View file

@ -1,10 +1,10 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = config.system.server.enable;
settings = { settings = {
server_name = "${config.domains.jim1}"; server_name = "${config.domains.p1}";
public_baseurl = "https://matrix.${config.domains.jim1}"; public_baseurl = "https://matrix.${config.domains.p1}";
suppress_key_server_warning = true; suppress_key_server_warning = true;
listeners = [ listeners = [
@ -19,9 +19,9 @@
]; ];
email = { email = {
notif_from = "Jimbo's Matrix <noreply@${config.domains.jim1}>"; notif_from = "Jimbo's Matrix <noreply@${config.domains.p1}>";
smtp_host = "mx.${config.domains.jim1}"; smtp_host = "mx.${config.domains.p1}";
smtp_user = "noreply@${config.domains.jim1}"; smtp_user = "noreply@${config.domains.p1}";
smtp_pass = config.secrets.noreplyPassword; smtp_pass = config.secrets.noreplyPassword;
enable_tls = true; enable_tls = true;
smtp_port = 587; smtp_port = 587;

View file

@ -1,6 +1,6 @@
{ config, ... }: { config, ... }:
{ {
services.nginx.virtualHosts."matrix.${config.domains.jim1}" = { services.nginx.virtualHosts."matrix.${config.domains.p1}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations = { locations = {

View file

@ -1,9 +1,9 @@
{ ... }: { config, ... }:
{ {
imports = [ ./nginx ]; imports = [ ./nginx ];
services.owncast = { services.owncast = {
enable = true; enable = config.system.server.enable;
port = 8060; port = 8060;
rtmp-port = 1945; rtmp-port = 1945;
listen = "0.0.0.0"; listen = "0.0.0.0";

View file

@ -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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -3,7 +3,7 @@
imports = [ ./nginx ]; imports = [ ./nginx ];
services.transmission = { services.transmission = {
enable = true; enable = config.system.server.enable;
credentialsFile = pkgs.writeText "credentials" config.secrets.transmissionCredFile; credentialsFile = pkgs.writeText "credentials" config.secrets.transmissionCredFile;
openPeerPorts = true; openPeerPorts = true;
settings.rpc-authentication-required = true; settings.rpc-authentication-required = true;

View file

@ -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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {

View file

@ -3,19 +3,19 @@
imports = [ ./nginx ]; imports = [ ./nginx ];
services.vaultwarden = { services.vaultwarden = {
enable = true; enable = config.system.server.enable;
config = { config = {
DOMAIN = "https://warden.${config.domains.jim1}"; DOMAIN = "https://warden.${config.domains.p1}";
SIGNUPS_ALLOWED = false; SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "127.0.0.1"; ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = 8222; ROCKET_PORT = 8222;
ROCKET_LOG = "critical"; ROCKET_LOG = "critical";
# Smtp email # Smtp email
SMTP_HOST = "mx.${config.domains.jim1}"; SMTP_HOST = "mx.${config.domains.p1}";
SMTP_FROM = "noreply@${config.domains.jim1}"; SMTP_FROM = "noreply@${config.domains.p1}";
SMTP_FROM_NAME = "Vaultwarden"; SMTP_FROM_NAME = "Vaultwarden";
SMTP_USERNAME = "noreply@${config.domains.jim1}"; SMTP_USERNAME = "noreply@${config.domains.p1}";
SMTP_PASSWORD = config.secrets.noreplyPassword; SMTP_PASSWORD = config.secrets.noreplyPassword;
SMTP_SECURITY = "starttls"; SMTP_SECURITY = "starttls";
SMTP_PORT = 587; SMTP_PORT = 587;

View file

@ -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; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {