The Blue Update #1
|
@ -1,14 +1,18 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
# Programs and apps
|
||||||
../../../modules/home
|
../../../modules/home
|
||||||
../../../modules/home/users
|
../../../modules/home/users
|
||||||
../../../modules/home/programs/fastfetch
|
../../../modules/home/programs/terminal/fastfetch
|
||||||
../../../modules/home/programs/git
|
../../../modules/home/programs/terminal/git
|
||||||
../../../modules/home/programs/ncmpcpp
|
../../../modules/home/programs/terminal/neovim
|
||||||
../../../modules/home/programs/neovim
|
../../../modules/home/programs/terminal/ranger
|
||||||
../../../modules/home/programs/ranger
|
../../../modules/home/programs/terminal/tmux
|
||||||
../../../modules/home/programs/tmux
|
|
||||||
../../../modules/home/utils/zsh
|
../../../modules/home/utils/zsh
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
../../../overlays
|
||||||
|
../../../variables
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware
|
./hardware
|
||||||
|
|
||||||
mailserver.nixosModule
|
|
||||||
../../../modules/system
|
../../../modules/system
|
||||||
../../../modules/system/accounts
|
../../../modules/system/accounts
|
||||||
../../../modules/system/devices/filesystems
|
../../../modules/system/devices/filesystems
|
||||||
|
../../../modules/system/devices/boot/systemd
|
||||||
../../../modules/system/devices/networking
|
../../../modules/system/devices/networking
|
||||||
../../../modules/system/devices/networking/firewall/server
|
../../../modules/system/devices/networking/firewall/server
|
||||||
../../../modules/system/devices/networking/wireguard/server
|
../../../modules/system/devices/networking/wireguard/server
|
||||||
|
@ -14,6 +14,11 @@
|
||||||
../../../modules/system/programs/security
|
../../../modules/system/programs/security
|
||||||
../../../modules/system/services/common
|
../../../modules/system/services/common
|
||||||
../../../modules/system/services/server
|
../../../modules/system/services/server
|
||||||
|
|
||||||
|
../../../overlays
|
||||||
|
../../../variables
|
||||||
|
|
||||||
|
mailserver.nixosModule
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "cyberspark";
|
networking.hostName = "cyberspark";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, outputs, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
swraid = {
|
swraid = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mdadmConf = ''
|
mdadmConf = ''
|
||||||
MAILADDR jimbo@${outputs.secrets.jimDomain}
|
MAILADDR jimbo@jimbosfiles.com
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
# Allow forwarding
|
# Allow forwarding
|
||||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
@ -10,9 +10,9 @@
|
||||||
firewall = {
|
firewall = {
|
||||||
allowPing = false;
|
allowPing = false;
|
||||||
extraInputRules = ''
|
extraInputRules = ''
|
||||||
ip saddr { ${outputs.ips.localSpan}.0/24, ${outputs.ips.wgSpan}.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
ip saddr { ${config.ips.localSpan}.0/24, ${config.ips.wgSpan}.0/24 } tcp dport 2049 accept comment "Accept NFS"
|
||||||
ip saddr { ${outputs.ips.pc}, ${outputs.secrets.lunaIP}, ${outputs.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
ip saddr { ${config.ips.pc}, ${config.secrets.lunaIP}, ${config.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP"
|
||||||
ip saddr ${outputs.ips.wgSpan}.3 tcp dport ${mailPorts} accept comment "Accept mail"
|
ip saddr ${config.ips.wgSpan}.3 tcp dport ${mailPorts} accept comment "Accept mail"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,28 +24,28 @@
|
||||||
content = ''
|
content = ''
|
||||||
chain PREROUTING {
|
chain PREROUTING {
|
||||||
type nat hook prerouting priority dstnat; policy accept;
|
type nat hook prerouting priority dstnat; policy accept;
|
||||||
tcp dport 2211 dnat to ${outputs.ips.pc}:22 comment "SSH to PC"
|
tcp dport 2211 dnat to ${config.ips.pc}:22 comment "SSH to PC"
|
||||||
tcp dport 2233 dnat to ${outputs.ips.wgSpan}.3:22 comment "SSH to Oracle VM"
|
tcp dport 2233 dnat to ${config.ips.wgSpan}.3:22 comment "SSH to Oracle VM"
|
||||||
|
|
||||||
udp dport { 27005, 27015, 7777 } dnat to ${outputs.ips.pc} comment "PC Hosted Games"
|
udp dport { 27005, 27015, 7777 } dnat to ${config.ips.pc} comment "PC Hosted Games"
|
||||||
|
|
||||||
tcp dport { 58010, 57989, 57984 } dnat to ${outputs.ips.pc} comment "PC Sunshine TCP"
|
tcp dport { 58010, 57989, 57984 } dnat to ${config.ips.pc} comment "PC Sunshine TCP"
|
||||||
udp dport { 57998, 57999, 58000 } dnat to ${outputs.ips.pc} comment "PC Sunshine UDP"
|
udp dport { 57998, 57999, 58000 } dnat to ${config.ips.pc} comment "PC Sunshine UDP"
|
||||||
|
|
||||||
tcp dport { 38010, 37989, 37984 } dnat to ${outputs.ips.vm} comment "VM Sunshine TCP"
|
tcp dport { 38010, 37989, 37984 } dnat to ${config.ips.vm} comment "VM Sunshine TCP"
|
||||||
udp dport { 37998, 37999, 38000 } dnat to ${outputs.ips.vm} comment "VM Sunshine UDP"
|
udp dport { 37998, 37999, 38000 } dnat to ${config.ips.vm} comment "VM Sunshine UDP"
|
||||||
|
|
||||||
udp dport { 7790, 7791, 7792 } dnat to ${outputs.ips.hx} comment "Deus Ex"
|
udp dport { 7790, 7791, 7792 } dnat to ${config.ips.hx} comment "Deus Ex"
|
||||||
|
|
||||||
ip saddr ${outputs.secrets.cornIP} tcp dport { 9943, 9944 } dnat to ${outputs.ips.vm} comment "VM ALVR TCP"
|
ip saddr ${config.secrets.cornIP} tcp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR TCP"
|
||||||
ip saddr ${outputs.secrets.cornIP} udp dport { 9943, 9944 } dnat to ${outputs.ips.vm} comment "VM ALVR UDP"
|
ip saddr ${config.secrets.cornIP} udp dport { 9943, 9944 } dnat to ${config.ips.vm} comment "VM ALVR UDP"
|
||||||
}
|
}
|
||||||
|
|
||||||
chain POSTROUTING {
|
chain POSTROUTING {
|
||||||
type nat hook postrouting priority 100; policy accept;
|
type nat hook postrouting priority 100; policy accept;
|
||||||
oifname "${outputs.ips.netInt}" masquerade
|
oifname "${config.ips.netInt}" masquerade
|
||||||
iifname "${outputs.ips.netInt}" oifname "${outputs.ips.wgInt}" masquerade comment "Traffic from public to WireGuard"
|
iifname "${config.ips.netInt}" oifname "${config.ips.wgInt}" masquerade comment "Traffic from public to WireGuard"
|
||||||
tcp dport ${mailPorts} oifname != "${outputs.ips.wgInt}" drop comment "Send mail"
|
tcp dport ${mailPorts} oifname != "${config.ips.wgInt}" drop comment "Send mail"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedUDPPorts = [ 51820 ];
|
allowedUDPPorts = [ 51820 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
"${outputs.ips.wgInt}" = {
|
"${config.ips.wgInt}" = {
|
||||||
# Define IP of client in per device config
|
# Define IP of client in per device config
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
privateKey = outputs.secrets.wgClientPriv;
|
privateKey = config.secrets.wgClientPriv;
|
||||||
peers = [
|
peers = [
|
||||||
{ # 0.0.0.0 makes wg act like a traditional VPN
|
{ # 0.0.0.0 makes wg act like a traditional VPN
|
||||||
publicKey = outputs.secrets.wgServerPub;
|
publicKey = config.secrets.wgServerPub;
|
||||||
allowedIPs = [ "0.0.0.0/0" ];
|
allowedIPs = [ "0.0.0.0/0" ];
|
||||||
endpoint = "sv.${outputs.secrets.jimDomain}:51820";
|
endpoint = "sv.${config.secrets.jimDomain}:51820";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
nat = {
|
nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
externalInterface = "${outputs.ips.netInt}";
|
externalInterface = "${config.ips.netInt}";
|
||||||
internalInterfaces = [ "${outputs.ips.wgInt}" ];
|
internalInterfaces = [ "${config.ips.wgInt}" ];
|
||||||
};
|
};
|
||||||
firewall.allowedUDPPorts = [ 51820 ];
|
firewall.allowedUDPPorts = [ 51820 ];
|
||||||
};
|
};
|
||||||
|
@ -12,22 +12,22 @@
|
||||||
networking.wireguard = {
|
networking.wireguard = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces = {
|
interfaces = {
|
||||||
"${outputs.ips.wgInt}" = {
|
"${config.ips.wgInt}" = {
|
||||||
ips = [ "${outputs.ips.wgSpan}.1/24" ];
|
ips = [ "${config.ips.wgSpan}.1/24" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
privateKey = outputs.secrets.wgServerPriv;
|
privateKey = config.secrets.wgServerPriv;
|
||||||
peers = [
|
peers = [
|
||||||
{ # Jimbo Pixel 9
|
{ # Jimbo Pixel 9
|
||||||
publicKey = outputs.secrets.wgPixel9Pub;
|
publicKey = config.secrets.wgPixel9Pub;
|
||||||
allowedIPs = [ "${outputs.ips.wgSpan}.2/32" ];
|
allowedIPs = [ "${config.ips.wgSpan}.2/32" ];
|
||||||
}
|
}
|
||||||
{ # Oracle VM
|
{ # Oracle VM
|
||||||
publicKey = outputs.secrets.wgOraclePub;
|
publicKey = config.secrets.wgOraclePub;
|
||||||
allowedIPs = [ "${outputs.ips.wgSpan}.3/32" ];
|
allowedIPs = [ "${config.ips.wgSpan}.3/32" ];
|
||||||
}
|
}
|
||||||
{ # General Nix
|
{ # General Nix
|
||||||
publicKey = outputs.secrets.wgClientPub;
|
publicKey = config.secrets.wgClientPub;
|
||||||
allowedIPs = [ "${outputs.ips.wgSpan}.16/28" ];
|
allowedIPs = [ "${config.ips.wgSpan}.16/28" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
wireless.iwd.enable = true;
|
wireless.iwd.enable = true;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = outputs.secrets.jimEmail;
|
defaults.email = "jimjam4real@gmail.com";
|
||||||
certs = {
|
certs = {
|
||||||
"turn.${outputs.secrets.jimDomain}" = {
|
"turn.${config.secrets.jimDomain}" = {
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
postRun = "systemctl restart coturn.service";
|
postRun = "systemctl restart coturn.service";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.ddclient = {
|
services.ddclient = {
|
||||||
enable = true;
|
enable = true;
|
||||||
protocol = "cloudflare";
|
protocol = "cloudflare";
|
||||||
use = "web, web=https://ipinfo.io/ip";
|
use = "web, web=https://ipinfo.io/ip";
|
||||||
zone = "${outputs.secrets.jimDomain}";
|
zone = "${config.secrets.jimDomain}";
|
||||||
username = "token";
|
username = "token";
|
||||||
passwordFile = "${pkgs.writeText "cloudflareapikey" outputs.secrets.flareApiKey}";
|
passwordFile = "${pkgs.writeText "cloudflareapikey" config.secrets.flareApiKey}";
|
||||||
domains = [
|
domains = [
|
||||||
"${outputs.secrets.jimDomain}"
|
"${config.secrets.jimDomain}"
|
||||||
"*.${outputs.secrets.jimDomain}"
|
"*.${config.secrets.jimDomain}"
|
||||||
"sv.${outputs.secrets.jimDomain}"
|
"sv.${config.secrets.jimDomain}"
|
||||||
"git.${outputs.secrets.jimDomain}"
|
"git.${config.secrets.jimDomain}"
|
||||||
"rtmp.${outputs.secrets.jimDomain}"
|
"rtmp.${config.secrets.jimDomain}"
|
||||||
"turn.${outputs.secrets.jimDomain}"
|
"turn.${config.secrets.jimDomain}"
|
||||||
"dew.${outputs.secrets.jimDomain}"
|
"dew.${config.secrets.jimDomain}"
|
||||||
"john.${outputs.secrets.jimDomain}"
|
"john.${config.secrets.jimDomain}"
|
||||||
"beta.${outputs.secrets.jimDomain}"
|
"beta.${config.secrets.jimDomain}"
|
||||||
"rogue.${outputs.secrets.jimDomain}"
|
"rogue.${config.secrets.jimDomain}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
samba = {
|
samba = {
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
server string = JimSMB
|
server string = JimSMB
|
||||||
security = user
|
security = user
|
||||||
hosts allow = ${outputs.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
|
||||||
guest account = nobody
|
guest account = nobody
|
||||||
map to guest = bad user
|
map to guest = bad user
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud29;
|
package = pkgs.nextcloud29;
|
||||||
hostName = "cloud.${outputs.secrets.jimDomain}";
|
hostName = "cloud.${config.secrets.jimDomain}";
|
||||||
datadir = "/mnt/nextcloud";
|
datadir = "/mnt/nextcloud";
|
||||||
https = true;
|
https = true;
|
||||||
config = {
|
config = {
|
||||||
|
@ -13,20 +13,20 @@
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
trusted_proxies = [ "127.0.0.1" ];
|
trusted_proxies = [ "127.0.0.1" ];
|
||||||
trusted_domains = [ "cloud.${outputs.secrets.jimDomain}" ];
|
trusted_domains = [ "cloud.${config.secrets.jimDomain}" ];
|
||||||
overwriteprotocol = "https";
|
overwriteprotocol = "https";
|
||||||
mail_smtphost = "mx.${outputs.secrets.jimDomain}";
|
mail_smtphost = "mx.${config.secrets.jimDomain}";
|
||||||
mail_domain = "${outputs.secrets.jimDomain}";
|
mail_domain = "${config.secrets.jimDomain}";
|
||||||
mail_from_address = "noreply";
|
mail_from_address = "noreply";
|
||||||
mail_smtpauth = "true";
|
mail_smtpauth = "true";
|
||||||
mail_smtpname = "noreply@${outputs.secrets.jimDomain}";
|
mail_smtpname = "noreply@${config.secrets.jimDomain}";
|
||||||
mail_smtppassword = outputs.secrets.noreplyPassword;
|
mail_smtppassword = config.secrets.noreplyPassword;
|
||||||
mail_smtpmode = "smtp";
|
mail_smtpmode = "smtp";
|
||||||
mail_smtpport = 587;
|
mail_smtpport = 587;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."cloud.${outputs.secrets.jimDomain}" = {
|
nginx.virtualHosts."cloud.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
photoprism = {
|
photoprism = {
|
||||||
|
@ -8,17 +8,17 @@
|
||||||
address = "0.0.0.0";
|
address = "0.0.0.0";
|
||||||
settings = {
|
settings = {
|
||||||
PHOTOPRISM_ADMIN_USER = "jimbo";
|
PHOTOPRISM_ADMIN_USER = "jimbo";
|
||||||
PHOTOPRISM_ADMIN_PASSWORD = "${outputs.secrets.prismAdminPass}";
|
PHOTOPRISM_ADMIN_PASSWORD = "${config.secrets.prismAdminPass}";
|
||||||
PHOTOPRISM_DEFAULT_LOCALE = "en";
|
PHOTOPRISM_DEFAULT_LOCALE = "en";
|
||||||
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
||||||
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
||||||
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
||||||
PHOTOPRISM_DATABASE_USER = "photoprism";
|
PHOTOPRISM_DATABASE_USER = "photoprism";
|
||||||
PHOTOPRISM_SITE_URL = "https://gallery.${outputs.secrets.jimDomain}";
|
PHOTOPRISM_SITE_URL = "https://gallery.${config.secrets.jimDomain}";
|
||||||
PHOTOPRISM_SITE_TITLE = "Jimbo's PhotoPrism";
|
PHOTOPRISM_SITE_TITLE = "Jimbo's PhotoPrism";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."gallery.${outputs.secrets.jimDomain}" = {
|
nginx.virtualHosts."gallery.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -9,8 +9,8 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
DOMAIN = "git.${outputs.secrets.jimDomain}";
|
DOMAIN = "git.${config.secrets.jimDomain}";
|
||||||
ROOT_URL = "https://git.${outputs.secrets.jimDomain}:443";
|
ROOT_URL = "https://git.${config.secrets.jimDomain}:443";
|
||||||
HTTP_PORT = 3110;
|
HTTP_PORT = 3110;
|
||||||
SSH_PORT = 2299;
|
SSH_PORT = 2299;
|
||||||
START_SSH_SERVER = true;
|
START_SSH_SERVER = true;
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
};
|
};
|
||||||
mailer = {
|
mailer = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
SMTP_ADDR = "mx.${outputs.secrets.jimDomain}";
|
SMTP_ADDR = "mx.${config.secrets.jimDomain}";
|
||||||
FROM = "Jimbo's Git <noreply@${outputs.secrets.jimDomain}>";
|
FROM = "Jimbo's Git <noreply@${config.secrets.jimDomain}>";
|
||||||
USER = "noreply@${outputs.secrets.jimDomain}";
|
USER = "noreply@${config.secrets.jimDomain}";
|
||||||
PASSWD = outputs.secrets.noreplyPassword;
|
PASSWD = config.secrets.noreplyPassword;
|
||||||
PROTOCOL = "smtps";
|
PROTOCOL = "smtps";
|
||||||
};
|
};
|
||||||
service = {
|
service = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."git.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -8,14 +8,14 @@
|
||||||
icecast = {
|
icecast = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listen.port = 265;
|
listen.port = 265;
|
||||||
hostname = "icecast.${outputs.secrets.jimDomain}";
|
hostname = "icecast.${config.secrets.jimDomain}";
|
||||||
admin = {
|
admin = {
|
||||||
user = "jimbo";
|
user = "jimbo";
|
||||||
password = "${outputs.secrets.castAdminPass}";
|
password = "${config.secrets.castAdminPass}";
|
||||||
};
|
};
|
||||||
extraConf = ''
|
extraConf = ''
|
||||||
<authentication>
|
<authentication>
|
||||||
<source-password>${outputs.secrets.castSourcePass}</source-password>
|
<source-password>${config.secrets.castSourcePass}</source-password>
|
||||||
</authentication>
|
</authentication>
|
||||||
|
|
||||||
<location>Canada</location>
|
<location>Canada</location>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=265,
|
port=265,
|
||||||
password="${outputs.secrets.castSourcePass}",
|
password="${config.secrets.castSourcePass}",
|
||||||
public=true,
|
public=true,
|
||||||
icy_metadata=["artist", "title"],
|
icy_metadata=["artist", "title"],
|
||||||
mount="jimbops.opus",
|
mount="jimbops.opus",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."icecast.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."icecast.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -8,8 +8,8 @@
|
||||||
mailserver = rec {
|
mailserver = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
domains = [ "${outputs.secrets.jimDomain}" ];
|
domains = [ "${config.secrets.jimDomain}" ];
|
||||||
fqdn = "mx.${outputs.secrets.jimDomain}";
|
fqdn = "mx.${config.secrets.jimDomain}";
|
||||||
certificateScheme = "acme-nginx";
|
certificateScheme = "acme-nginx";
|
||||||
localDnsResolver = false;
|
localDnsResolver = false;
|
||||||
redis.port = 1515;
|
redis.port = 1515;
|
||||||
|
@ -17,29 +17,29 @@
|
||||||
# Dmarc info
|
# Dmarc info
|
||||||
dmarcReporting = {
|
dmarcReporting = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "${outputs.secrets.jimDomain}";
|
domain = "${config.secrets.jimDomain}";
|
||||||
localpart = "noreply";
|
localpart = "noreply";
|
||||||
organizationName = "Jimbo's Files";
|
organizationName = "Jimbo's Files";
|
||||||
};
|
};
|
||||||
|
|
||||||
# A list of accounts, passwords generated with nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
# A list of accounts, passwords generated with nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"noreply@${outputs.secrets.jimDomain}" = {
|
"noreply@${config.secrets.jimDomain}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "noreply" outputs.secrets.noreplyMailHash;
|
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||||
sendOnly = true;
|
sendOnly = true;
|
||||||
};
|
};
|
||||||
"jimbo@${outputs.secrets.jimDomain}" = {
|
"jimbo@${config.secrets.jimDomain}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "jimbo" outputs.secrets.jimboMailHash;
|
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
||||||
aliases = [ "james@${outputs.secrets.jimDomain}" "contact@${outputs.secrets.jimDomain}" ];
|
aliases = [ "james@${config.secrets.jimDomain}" "contact@${config.secrets.jimDomain}" ];
|
||||||
};
|
};
|
||||||
"lunamoonlight@${outputs.secrets.jimDomain}" = {
|
"lunamoonlight@${config.secrets.jimDomain}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "luna" outputs.secrets.lunaMailHash;
|
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
||||||
};
|
};
|
||||||
"freecorn1854@${outputs.secrets.jimDomain}" = {
|
"freecorn1854@${config.secrets.jimDomain}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "freecorn" outputs.secrets.freecornMailHash;
|
hashedPasswordFile = pkgs.writeText "freecorn" config.secrets.freecornMailHash;
|
||||||
};
|
};
|
||||||
"tinyattack09@${outputs.secrets.jimDomain}" = {
|
"tinyattack09@${config.secrets.jimDomain}" = {
|
||||||
hashedPasswordFile = pkgs.writeText "tiny" outputs.secrets.tinyMailHash;
|
hashedPasswordFile = pkgs.writeText "tiny" config.secrets.tinyMailHash;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."mx.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."mx.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "mail.${outputs.secrets.jimDomain}";
|
hostName = "mail.${config.secrets.jimDomain}";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$config['smtp_server'] = "tls://mx.${outputs.secrets.jimDomain}";
|
$config['smtp_server'] = "tls://mx.${config.secrets.jimDomain}";
|
||||||
$config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ inputs, ... }:
|
{ minecraft, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.minecraft.nixosModules.minecraft-servers
|
minecraft.nixosModules.minecraft-servers
|
||||||
./servers/velocity
|
./servers/velocity
|
||||||
./servers/dewdemolisher
|
./servers/dewdemolisher
|
||||||
./servers/johnside
|
./servers/johnside
|
||||||
|
@ -10,6 +10,8 @@
|
||||||
./servers/uberbeta
|
./servers/uberbeta
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ minecraft.overlay ];
|
||||||
|
|
||||||
services.minecraft-servers = {
|
services.minecraft-servers = {
|
||||||
enable = true;
|
enable = true;
|
||||||
eula = true;
|
eula = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
services.minecraft-servers.servers.blockworld = {
|
services.minecraft-servers.servers.blockworld = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
services.minecraft-servers.servers.dewdemolisher = {
|
services.minecraft-servers.servers.dewdemolisher = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
services = {
|
services = {
|
||||||
minecraft-servers.servers.johnside = {
|
minecraft-servers.servers.johnside = {
|
||||||
|
@ -43,7 +43,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# BlueMap webhost
|
# BlueMap webhost
|
||||||
nginx.virtualHosts."john.${outputs.secrets.jimDomain}" = {
|
nginx.virtualHosts."john.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
services = {
|
services = {
|
||||||
minecraft-servers.servers.roguecraft = {
|
minecraft-servers.servers.roguecraft = {
|
||||||
|
@ -12,19 +12,19 @@ in {
|
||||||
server-port = 30014;
|
server-port = 30014;
|
||||||
motd = "\\u00A7l\\u00A7bJimbo's \\u00A7cRoguecraft \\u00A7bserver.";
|
motd = "\\u00A7l\\u00A7bJimbo's \\u00A7cRoguecraft \\u00A7bserver.";
|
||||||
require-resource-pack = true;
|
require-resource-pack = true;
|
||||||
resource-pack = "https://${outputs.secrets.jimDomain}/roguecraftresourcepackredir";
|
resource-pack = "https://${config.secrets.jimDomain}/roguecraftresourcepackredir";
|
||||||
resource-pack-sha1 = "b540c0562aba90c3ead2356bb9cb74fcf0db36b3";
|
resource-pack-sha1 = "b540c0562aba90c3ead2356bb9cb74fcf0db36b3";
|
||||||
};
|
};
|
||||||
whitelist = common.whitelist;
|
whitelist = common.whitelist;
|
||||||
symlinks = common.paperSymlinks;
|
symlinks = common.paperSymlinks;
|
||||||
files = common.configFiles // {
|
files = common.configFiles // {
|
||||||
"world/datapacks/roguecraft.zip" = builtins.fetchurl {
|
"world/datapacks/roguecraft.zip" = builtins.fetchurl {
|
||||||
url = "https://${outputs.secrets.jimDomain}/roguecraftdatapackredir";
|
url = "https://${config.secrets.jimDomain}/roguecraftdatapackredir";
|
||||||
sha256 = "04zrkvzvi1i898al45fh9j3k635sf9qhwca7phbv4ynkfl8bz3q3";
|
sha256 = "04zrkvzvi1i898al45fh9j3k635sf9qhwca7phbv4ynkfl8bz3q3";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."${outputs.secrets.jimDomain}".locations = {
|
nginx.virtualHosts."${config.secrets.jimDomain}".locations = {
|
||||||
"/roguecraftdatapackredir" = {
|
"/roguecraftdatapackredir" = {
|
||||||
return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/Rme4c23R/Roguecraft%201.2.6%20-%20Data%20Pack.zip";
|
return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/Rme4c23R/Roguecraft%201.2.6%20-%20Data%20Pack.zip";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
uberBukkitZip = pkgs.fetchzip {
|
uberBukkitZip = pkgs.fetchzip {
|
||||||
url = "https://github.com/Moresteck/Project-Poseidon-Uberbukkit/releases/download/2.0.0/uberbukkit-2.0.0-java17.zip";
|
url = "https://github.com/Moresteck/Project-Poseidon-Uberbukkit/releases/download/2.0.0/uberbukkit-2.0.0-java17.zip";
|
||||||
sha256 = "m4hgcqXJ43SnBGn6qNBGeEcXFv5Q8f/VFYJmx3aJ9PE=";
|
sha256 = "m4hgcqXJ43SnBGn6qNBGeEcXFv5Q8f/VFYJmx3aJ9PE=";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
common = import ../common.nix { inherit pkgs; };
|
common = import ../../common { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
services.minecraft-servers.servers.velocity = {
|
services.minecraft-servers.servers.velocity = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
# Landing page
|
# Landing page
|
||||||
"${outputs.secrets.jimDomain}" = {
|
"${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
root = "/var/www/Jimbo-Landing-Page";
|
root = "/var/www/Jimbo-Landing-Page";
|
||||||
|
@ -22,13 +22,13 @@
|
||||||
return 200 '
|
return 200 '
|
||||||
{
|
{
|
||||||
"m.homeserver": {
|
"m.homeserver": {
|
||||||
"base_url": "https://matrix.${outputs.secrets.jimDomain}"
|
"base_url": "https://matrix.${config.secrets.jimDomain}"
|
||||||
},
|
},
|
||||||
"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.${outputs.secrets.jimDomain}"
|
"url": "https://matrix.${config.secrets.jimDomain}"
|
||||||
}
|
}
|
||||||
}';
|
}';
|
||||||
'';
|
'';
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
"/.well-known/matrix/server" = {
|
"/.well-known/matrix/server" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
return 200 '{"m.server": "matrix.${outputs.secrets.jimDomain}:443"}';
|
return 200 '{"m.server": "matrix.${config.secrets.jimDomain}:443"}';
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -9,12 +9,12 @@
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
settings = {
|
settings = {
|
||||||
hostname = "lemmy.${outputs.secrets.jimDomain}";
|
hostname = "lemmy.${config.secrets.jimDomain}";
|
||||||
email = {
|
email = {
|
||||||
smtp_server = "mx.${outputs.secrets.jimDomain}:587";
|
smtp_server = "mx.${config.secrets.jimDomain}:587";
|
||||||
smtp_login = "noreply@${outputs.secrets.jimDomain}";
|
smtp_login = "noreply@${config.secrets.jimDomain}";
|
||||||
smtp_from_address = "Jimbo's Lemmy <noreply@${outputs.secrets.jimDomain}>";
|
smtp_from_address = "Jimbo's Lemmy <noreply@${config.secrets.jimDomain}>";
|
||||||
smtp_password = outputs.secrets.noreplyPassword;
|
smtp_password = config.secrets.noreplyPassword;
|
||||||
tls_type = "starttls";
|
tls_type = "starttls";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."lemmy.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."lemmy.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.mastodon = {
|
services.mastodon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
localDomain = "social.${outputs.secrets.jimDomain}";
|
localDomain = "social.${config.secrets.jimDomain}";
|
||||||
streamingProcesses = 4;
|
streamingProcesses = 4;
|
||||||
configureNginx = true;
|
configureNginx = true;
|
||||||
smtp = {
|
smtp = {
|
||||||
createLocally = false;
|
createLocally = false;
|
||||||
host = "mx.${outputs.secrets.jimDomain}";
|
host = "mx.${config.secrets.jimDomain}";
|
||||||
port = 587;
|
port = 587;
|
||||||
authenticate = true;
|
authenticate = true;
|
||||||
fromAddress = "Jimbo's Mastodon <noreply@${outputs.secrets.jimDomain}>";
|
fromAddress = "Jimbo's Mastodon <noreply@${config.secrets.jimDomain}>";
|
||||||
user = "noreply@${outputs.secrets.jimDomain}";
|
user = "noreply@${config.secrets.jimDomain}";
|
||||||
passwordFile = pkgs.writeText "smtp_pass.txt" outputs.secrets.noreplyPassword;
|
passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.noreplyPassword;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -7,16 +7,16 @@
|
||||||
nixpkgs.config.element-web.conf = {
|
nixpkgs.config.element-web.conf = {
|
||||||
default_server_config = {
|
default_server_config = {
|
||||||
"m.homeserver" = {
|
"m.homeserver" = {
|
||||||
base_url = "https://matrix.${outputs.secrets.jimDomain}";
|
base_url = "https://matrix.${config.secrets.jimDomain}";
|
||||||
server_name = "matrix.${outputs.secrets.jimDomain}";
|
server_name = "matrix.${config.secrets.jimDomain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
branding = {
|
branding = {
|
||||||
#welcome_background_url = "https://staging.${outputs.secrets.jimDomain}/images/backgrounds/bloxelcom-sunset.jpg";
|
#welcome_background_url = "https://staging.${config.secrets.jimDomain}/images/backgrounds/bloxelcom-sunset.jpg";
|
||||||
#auth_header_logo_url = "https://staging.${outputs.secrets.jimDomain}/images/logos/bloxelcom.png";
|
#auth_header_logo_url = "https://staging.${config.secrets.jimDomain}/images/logos/bloxelcom.png";
|
||||||
};
|
};
|
||||||
embedded_pages = {
|
embedded_pages = {
|
||||||
home_url = "https://www.${outputs.secrets.jimDomain}/";
|
home_url = "https://www.${config.secrets.jimDomain}/";
|
||||||
};
|
};
|
||||||
disable_custom_urls = true;
|
disable_custom_urls = true;
|
||||||
disable_guests = true;
|
disable_guests = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."chat.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."chat.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
root = "${pkgs.element-web}";
|
root = "${pkgs.element-web}";
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{ outputs, config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./nginx
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
coturn = {
|
coturn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -9,16 +13,16 @@
|
||||||
max-port = 50000;
|
max-port = 50000;
|
||||||
use-auth-secret = true;
|
use-auth-secret = true;
|
||||||
static-auth-secret = "will be world readable for local users :(";
|
static-auth-secret = "will be world readable for local users :(";
|
||||||
realm = "turn.${outputs.secrets.jimDomain}";
|
realm = "turn.${config.secrets.jimDomain}";
|
||||||
cert = "/var/lib/acme/turn.${outputs.secrets.jimDomain}.com/fullchain.pem";
|
cert = "/var/lib/acme/turn.${config.secrets.jimDomain}.com/fullchain.pem";
|
||||||
pkey = "/var/lib/acme/turn.${outputs.secrets.jimDomain}.com/key.pem";
|
pkey = "/var/lib/acme/turn.${config.secrets.jimDomain}.com/key.pem";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable coturn on Synapse
|
# Enable coturn on Synapse
|
||||||
matrix-synapse.settings = {
|
matrix-synapse.settings = {
|
||||||
turn_uris = [
|
turn_uris = [
|
||||||
"turn:turn.${outputs.secrets.jimDomain}:3478?transport=udp"
|
"turn:turn.${config.secrets.jimDomain}:3478?transport=udp"
|
||||||
"turn:turn.${outputs.secrets.jimDomain}:3478?transport=tcp"
|
"turn:turn.${config.secrets.jimDomain}:3478?transport=tcp"
|
||||||
];
|
];
|
||||||
turn_shared_secret = config.services.coturn.static-auth-secret;
|
turn_shared_secret = config.services.coturn.static-auth-secret;
|
||||||
turn_user_lifetime = "1h";
|
turn_user_lifetime = "1h";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."turn.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."turn.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
listen = [{
|
listen = [{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./coturn
|
./coturn
|
||||||
|
@ -9,8 +9,8 @@
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server_name = "${outputs.secrets.jimDomain}";
|
server_name = "${config.secrets.jimDomain}";
|
||||||
public_baseurl = "https://matrix.${outputs.secrets.jimDomain}";
|
public_baseurl = "https://matrix.${config.secrets.jimDomain}";
|
||||||
suppress_key_server_warning = true;
|
suppress_key_server_warning = true;
|
||||||
|
|
||||||
listeners = [{
|
listeners = [{
|
||||||
|
@ -23,10 +23,10 @@
|
||||||
}];
|
}];
|
||||||
|
|
||||||
email = {
|
email = {
|
||||||
notif_from = "Jimbo's Matrix <noreply@${outputs.secrets.jimDomain}>";
|
notif_from = "Jimbo's Matrix <noreply@${config.secrets.jimDomain}>";
|
||||||
smtp_host = "mx.${outputs.secrets.jimDomain}";
|
smtp_host = "mx.${config.secrets.jimDomain}";
|
||||||
smtp_user = "noreply@${outputs.secrets.jimDomain}";
|
smtp_user = "noreply@${config.secrets.jimDomain}";
|
||||||
smtp_pass = outputs.secrets.noreplyPassword;
|
smtp_pass = config.secrets.noreplyPassword;
|
||||||
enable_tls = true;
|
enable_tls = true;
|
||||||
smtp_port = 587;
|
smtp_port = 587;
|
||||||
require_transport_security = true;
|
require_transport_security = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."matrix.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."matrix.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations = {
|
locations = {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.matrix-sliding-sync = {
|
services.matrix-sliding-sync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
SYNCV3_SERVER = "https://matrix.${outputs.secrets.jimDomain}";
|
SYNCV3_SERVER = "https://matrix.${config.secrets.jimDomain}";
|
||||||
SYNCV3_BINDADDR = "0.0.0.0:8009";
|
SYNCV3_BINDADDR = "0.0.0.0:8009";
|
||||||
};
|
};
|
||||||
environmentFile = pkgs.writeText "matrixsecret" ''
|
environmentFile = "${pkgs.writeText "matrixsecret" ''
|
||||||
SYNCV3_SECRET=${outputs.secrets.matrixSecret}
|
SYNCV3_SECRET=${config.secrets.matrixSecret}
|
||||||
'';
|
''}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."live.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."live.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.pixelfed = {
|
services.pixelfed = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "pics.${outputs.secrets.jimDomain}";
|
domain = "pics.${config.secrets.jimDomain}";
|
||||||
secretFile = pkgs.writeText "appkey" outputs.secrets.pixelfedKey;
|
secretFile = pkgs.writeText "appkey" config.secrets.pixelfedKey;
|
||||||
settings = {
|
settings = {
|
||||||
APP_NAME = ''"Jimbo's Pixelfed"'';
|
APP_NAME = ''"Jimbo's Pixelfed"'';
|
||||||
INSTANCE_DESCRIPTION = ''"The Jimbosfiles Pixelfed Instance"'';
|
INSTANCE_DESCRIPTION = ''"The Jimbosfiles Pixelfed Instance"'';
|
||||||
INSTANCE_CONTACT_EMAIL = "jimbo@${outputs.secrets.jimDomain}";
|
INSTANCE_CONTACT_EMAIL = "jimbo@${config.secrets.jimDomain}";
|
||||||
OPEN_REGISTRATION = true;
|
OPEN_REGISTRATION = true;
|
||||||
APP_LOCALE = "en";
|
APP_LOCALE = "en";
|
||||||
INSTANCE_DISCOVER_PUBLIC = false;
|
INSTANCE_DISCOVER_PUBLIC = false;
|
||||||
|
@ -15,14 +15,14 @@
|
||||||
|
|
||||||
# Mail config
|
# Mail config
|
||||||
ENFORCE_EMAIL_VERIFICATION = true;
|
ENFORCE_EMAIL_VERIFICATION = true;
|
||||||
MAIL_FROM_ADDRESS = "noreply@${outputs.secrets.jimDomain}";
|
MAIL_FROM_ADDRESS = "noreply@${config.secrets.jimDomain}";
|
||||||
MAIL_FROM_NAME = ''"Jimbo's Pixelfed <noreply@${outputs.secrets.jimDomain}>"'';
|
MAIL_FROM_NAME = ''"Jimbo's Pixelfed <noreply@${config.secrets.jimDomain}>"'';
|
||||||
MAIL_ENCRYPTION = "tls";
|
MAIL_ENCRYPTION = "tls";
|
||||||
MAIL_DRIVER = "smtp";
|
MAIL_DRIVER = "smtp";
|
||||||
MAIL_HOST = "mx.${outputs.secrets.jimDomain}";
|
MAIL_HOST = "mx.${config.secrets.jimDomain}";
|
||||||
MAIL_PORT = 587;
|
MAIL_PORT = 587;
|
||||||
MAIL_USERNAME = "noreply@${outputs.secrets.jimDomain}";
|
MAIL_USERNAME = "noreply@${config.secrets.jimDomain}";
|
||||||
MAIL_PASSWORD = "${outputs.secrets.noreplyPassword}";
|
MAIL_PASSWORD = "${config.secrets.noreplyPassword}";
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, outputs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
services.transmission = {
|
services.transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
credentialsFile = pkgs.writeText "credentials" outputs.secrets.transmissionCredFile;
|
credentialsFile = pkgs.writeText "credentials" config.secrets.transmissionCredFile;
|
||||||
openPeerPorts = true;
|
openPeerPorts = true;
|
||||||
settings = {
|
settings = {
|
||||||
rpc-authentication-required = true;
|
rpc-authentication-required = true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."torrent.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."torrent.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
|
@ -7,18 +7,18 @@
|
||||||
services.vaultwarden = {
|
services.vaultwarden = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
DOMAIN = "https://warden.${outputs.secrets.jimDomain}";
|
DOMAIN = "https://warden.${config.secrets.jimDomain}";
|
||||||
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.${outputs.secrets.jimDomain}";
|
SMTP_HOST = "mx.${config.secrets.jimDomain}";
|
||||||
SMTP_FROM = "Jimbo's Vaultwarden <noreply@${outputs.secrets.jimDomain}>";
|
SMTP_FROM = "Jimbo's Vaultwarden <noreply@${config.secrets.jimDomain}>";
|
||||||
SMTP_FROM_NAME = "Vaultwarden";
|
SMTP_FROM_NAME = "Vaultwarden";
|
||||||
SMTP_USERNAME = "noreply@${outputs.secrets.jimDomain}";
|
SMTP_USERNAME = "noreply@${config.secrets.jimDomain}";
|
||||||
SMTP_PASSWORD = outputs.secrets.noreplyPassword;
|
SMTP_PASSWORD = config.secrets.noreplyPassword;
|
||||||
SMTP_SECURITY = "starttls";
|
SMTP_SECURITY = "starttls";
|
||||||
SMTP_PORT = 587;
|
SMTP_PORT = 587;
|
||||||
SMTP_TIMEOUT = 15;
|
SMTP_TIMEOUT = 15;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ outputs, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."warden.${outputs.secrets.jimDomain}" = {
|
services.nginx.virtualHosts."warden.${config.secrets.jimDomain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
|
Loading…
Reference in a new issue