diff --git a/ops/nixos/totoro/default.nix b/ops/nixos/totoro/default.nix index 90dc6f66ea..120ab8f2e3 100644 --- a/ops/nixos/totoro/default.nix +++ b/ops/nixos/totoro/default.nix @@ -103,6 +103,23 @@ in { firewall.allowedUDPPorts = [ 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"; @@ -177,6 +194,15 @@ in { locations."~ (.php|\\/[^./]+)$" = fastcgi; locations."@router" = fastcgi; }; + + "plex-totoro.lukegb.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:32400/"; + proxyWebsockets = true; + }; + }; }; }; services.phpfpm = let settingsBase = {