nixos/kelder: MTU fix + disable all local redirects
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 33m1s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 33m1s
This commit is contained in:
parent
dd9439b7fa
commit
8878ce56c4
@ -343,6 +343,7 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
domain = "hentai.engineer";
|
domain = "hentai.engineer";
|
||||||
|
ipv4MTU = 1460;
|
||||||
vpn = {
|
vpn = {
|
||||||
port = 51820;
|
port = 51820;
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) mkMerge mkIf;
|
inherit (lib) mkMerge mkIf;
|
||||||
inherit (lib.my) networkdAssignment;
|
inherit (lib.my) networkdAssignment;
|
||||||
|
inherit (lib.my.c.kelder) ipv4MTU;
|
||||||
|
|
||||||
wg = {
|
wg = {
|
||||||
keyFile = "kelder/acquisition/airvpn-privkey";
|
keyFile = "kelder/acquisition/airvpn-privkey";
|
||||||
@ -89,6 +90,7 @@ in
|
|||||||
(networkdAssignment "host0" assignments.internal)
|
(networkdAssignment "host0" assignments.internal)
|
||||||
{
|
{
|
||||||
networkConfig.DNSDefaultRoute = false;
|
networkConfig.DNSDefaultRoute = false;
|
||||||
|
linkConfig.MTUBytes = toString ipv4MTU;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
"90-vpn" = with wg; {
|
"90-vpn" = with wg; {
|
||||||
|
@ -84,6 +84,7 @@ in
|
|||||||
c
|
c
|
||||||
];
|
];
|
||||||
acquisition = "http://${allAssignments.kelder-acquisition.internal.ipv4.address}";
|
acquisition = "http://${allAssignments.kelder-acquisition.internal.ipv4.address}";
|
||||||
|
# This is kinda borked because Virgin Media filters DNS responses with local IPs...
|
||||||
localRedirect = to: ''
|
localRedirect = to: ''
|
||||||
rewrite_by_lua_block {
|
rewrite_by_lua_block {
|
||||||
if ngx.var.remote_addr == pub_ip then
|
if ngx.var.remote_addr == pub_ip then
|
||||||
@ -103,7 +104,7 @@ in
|
|||||||
|
|
||||||
"monitor.${domain}" = withAuth {
|
"monitor.${domain}" = withAuth {
|
||||||
serverAliases = [ "monitor-local.${domain}" ];
|
serverAliases = [ "monitor-local.${domain}" ];
|
||||||
extraConfig = localRedirect "monitor-local.${domain}";
|
# extraConfig = localRedirect "monitor-local.${domain}";
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
proxyPass = "http://${allAssignments.kelder.ctrs.ipv4.address}:19999";
|
proxyPass = "http://${allAssignments.kelder.ctrs.ipv4.address}:19999";
|
||||||
@ -136,17 +137,17 @@ in
|
|||||||
};
|
};
|
||||||
"torrents.${domain}" = withAuth {
|
"torrents.${domain}" = withAuth {
|
||||||
serverAliases = [ "torrents-local.${domain}" ];
|
serverAliases = [ "torrents-local.${domain}" ];
|
||||||
extraConfig = localRedirect "torrents-local.${domain}";
|
# extraConfig = localRedirect "torrents-local.${domain}";
|
||||||
locations."/".proxyPass = "${acquisition}:9091";
|
locations."/".proxyPass = "${acquisition}:9091";
|
||||||
};
|
};
|
||||||
"jackett.${domain}" = withAuth {
|
"jackett.${domain}" = withAuth {
|
||||||
serverAliases = [ "jackett-local.${domain}" ];
|
serverAliases = [ "jackett-local.${domain}" ];
|
||||||
extraConfig = localRedirect "jackett-local.${domain}";
|
# extraConfig = localRedirect "jackett-local.${domain}";
|
||||||
locations."/".proxyPass = "${acquisition}:9117";
|
locations."/".proxyPass = "${acquisition}:9117";
|
||||||
};
|
};
|
||||||
"radarr.${domain}" = withAuth {
|
"radarr.${domain}" = withAuth {
|
||||||
serverAliases = [ "radarr-local.${domain}" ];
|
serverAliases = [ "radarr-local.${domain}" ];
|
||||||
extraConfig = localRedirect "radarr-local.${domain}";
|
# extraConfig = localRedirect "radarr-local.${domain}";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "${acquisition}:7878";
|
proxyPass = "${acquisition}:7878";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
@ -155,7 +156,7 @@ in
|
|||||||
};
|
};
|
||||||
"sonarr.${domain}" = withAuth {
|
"sonarr.${domain}" = withAuth {
|
||||||
serverAliases = [ "sonarr-local.${domain}" ];
|
serverAliases = [ "sonarr-local.${domain}" ];
|
||||||
extraConfig = localRedirect "sonarr-local.${domain}";
|
# extraConfig = localRedirect "sonarr-local.${domain}";
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "${acquisition}:8989";
|
proxyPass = "${acquisition}:8989";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.my) net;
|
inherit (lib.my) net;
|
||||||
inherit (lib.my.c.kelder) domain prefixes;
|
inherit (lib.my.c.kelder) domain prefixes ipv4MTU;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./containers ];
|
imports = [ ./containers ];
|
||||||
@ -182,7 +182,7 @@ in
|
|||||||
{
|
{
|
||||||
wireguardPeerConfig = {
|
wireguardPeerConfig = {
|
||||||
PublicKey = "bP1XUNxp9i8NLOXhgPaIaRzRwi5APbam44/xjvYcyjU=";
|
PublicKey = "bP1XUNxp9i8NLOXhgPaIaRzRwi5APbam44/xjvYcyjU=";
|
||||||
Endpoint = "estuary-vm.${lib.my.c.colony.domain}:${toString lib.my.c.kelder.vpn.port}";
|
Endpoint = "${allAssignments.estuary.internal.ipv4.address}:${toString lib.my.c.kelder.vpn.port}";
|
||||||
AllowedIPs = [ "0.0.0.0/0" ];
|
AllowedIPs = [ "0.0.0.0/0" ];
|
||||||
PersistentKeepalive = 25;
|
PersistentKeepalive = 25;
|
||||||
};
|
};
|
||||||
@ -200,6 +200,7 @@ in
|
|||||||
"50-lan" = {
|
"50-lan" = {
|
||||||
matchConfig.Name = "et1g0";
|
matchConfig.Name = "et1g0";
|
||||||
DHCP = "yes";
|
DHCP = "yes";
|
||||||
|
linkConfig.MTUBytes = toString ipv4MTU;
|
||||||
};
|
};
|
||||||
"80-ctrs" = mkMerge [
|
"80-ctrs" = mkMerge [
|
||||||
(networkdAssignment "ctrs" assignments.ctrs)
|
(networkdAssignment "ctrs" assignments.ctrs)
|
||||||
@ -272,7 +273,7 @@ in
|
|||||||
config.name = "kontent";
|
config.name = "kontent";
|
||||||
};
|
};
|
||||||
|
|
||||||
#deploy.node.hostname = "10.16.9.21";
|
# deploy.node.hostname = "192.168.0.69";
|
||||||
secrets = {
|
secrets = {
|
||||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFvUdJshXkqmchEgkZDn5rgtZ1NO9vbd6Px+S6YioWi";
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFvUdJshXkqmchEgkZDn5rgtZ1NO9vbd6Px+S6YioWi";
|
||||||
files = {
|
files = {
|
||||||
|
Loading…
Reference in New Issue
Block a user