From 1a969dfd17b3f242d556eeb365bd5d2558e0d77c Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Tue, 12 Aug 2025 22:41:02 -0500 Subject: [PATCH] fix pinchflat --- common/_home_manager/mods/ssh.nix | 4 ++-- hosts/h001/mods/pinchflat.nix | 36 ++++++++++++++++++++++--------- hosts/h001/nginx.nix | 2 +- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/common/_home_manager/mods/ssh.nix b/common/_home_manager/mods/ssh.nix index 8061cdc..543a2cd 100644 --- a/common/_home_manager/mods/ssh.nix +++ b/common/_home_manager/mods/ssh.nix @@ -94,7 +94,7 @@ in }; "mbptv_" = lib.mkIf (hasSecret "nix2gpdPocket3") { identityFile = age.secrets.nix2gpdPocket3.path; - hostname = "10.12.14.101"; + hostname = "10.12.14.30"; user = "waka"; setEnv = { TERM = "vt100"; @@ -119,7 +119,7 @@ in }; "h001_" = lib.mkIf (hasSecret "nix2h001") { identityFile = age.secrets.nix2h001.path; - hostname = "10.12.14.2"; + hostname = "10.12.14.10"; user = "luser"; }; "h002" = lib.mkIf (hasSecret "nix2h002") { diff --git a/hosts/h001/mods/pinchflat.nix b/hosts/h001/mods/pinchflat.nix index 5dba0ee..8690b69 100644 --- a/hosts/h001/mods/pinchflat.nix +++ b/hosts/h001/mods/pinchflat.nix @@ -9,6 +9,9 @@ port = 8945; selfhosted = true; mediaDir = "/drives/wd10/pinchflat/media"; + extraConfig = { + YT_DLP_WORKER_CONCURRENCY = 1; + }; }; users.users.pinchflat.isSystemUser = true; @@ -25,20 +28,33 @@ enable = true; vpnnamespace = "wg"; }; + vpnNamespaces.wg.portMappings = [ + { + from = 8945; + to = 8945; + } + ]; systemd.tmpfiles.rules = [ "d '/drives/wd10/pinchflat/media' 0775 pinchflat pinchflat - -" ]; - # services.nginx = { - # virtualHosts = { - # "yt.joshuabell.xyz" = { - # locations."/" = { - # proxyWebsockets = true; - # proxyPass = "http://localhost:8945"; - # }; - # }; - # }; - # }; + services.nginx = { + virtualHosts = { + "pinchflat" = { + serverName = "h001.net.joshuabell.xyz"; + listen = [ + { + port = 8945; + addr = "0.0.0.0"; + } + ]; + locations."/" = { + proxyWebsockets = true; + proxyPass = "http://192.168.15.1:8945"; + }; + }; + }; + }; }; } diff --git a/hosts/h001/nginx.nix b/hosts/h001/nginx.nix index fa0373b..1095170 100644 --- a/hosts/h001/nginx.nix +++ b/hosts/h001/nginx.nix @@ -9,7 +9,7 @@ let in { services.nginx.virtualHosts = { - "10.12.14.2" = { + "10.12.14.10" = { locations = { "/" = { return = "301 http://h001.local.joshuabell.xyz";