totoro: move plex stuff onto a macVLAN interface

This commit is contained in:
Luke Granger-Brown 2022-01-23 17:58:04 +00:00
parent 7673e8be9d
commit 4729529b4d

View file

@ -103,6 +103,23 @@ in {
firewall.allowedUDPPorts = [ firewall.allowedUDPPorts = [
4001 # ipfs 4001 # ipfs
]; ];
macvlans.mv-plex = { interface = "br-ext"; };
interfaces.mv-plex = {
virtual = true;
ipv4.addresses = [
# plex-totoro
{ address = "92.118.30.20"; prefixLength = 32; }
];
ipv6.addresses = [
# plex-totoro
{ address = "2a09:a443::1:1000"; prefixLength = 128; }
];
};
interfaces.lo.ipv4.addresses = [
{ address = "92.118.30.19"; prefixLength = 32; }
];
}; };
my.ip.tailscale = "100.122.86.11"; my.ip.tailscale = "100.122.86.11";
@ -177,6 +194,15 @@ in {
locations."~ (.php|\\/[^./]+)$" = fastcgi; locations."~ (.php|\\/[^./]+)$" = fastcgi;
locations."@router" = fastcgi; locations."@router" = fastcgi;
}; };
"plex-totoro.lukegb.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:32400/";
proxyWebsockets = true;
};
};
}; };
}; };
services.phpfpm = let settingsBase = { services.phpfpm = let settingsBase = {