From 14b0eaff084f6003eae64c73bfe9fa5bcd185133 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Wed, 8 Oct 2025 14:03:31 -0500 Subject: [PATCH] n8n stuff --- hosts/h001/mods/default.nix | 1 + hosts/h001/mods/n8n.nix | 33 +++++++++++++++++++++++++++++++++ hosts/oracle/o001/nginx.nix | 8 ++++++++ 3 files changed, 42 insertions(+) create mode 100644 hosts/h001/mods/n8n.nix diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index 89dfef1..214f3c6 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -10,5 +10,6 @@ ./openwebui.nix ./trilium.nix ./oauth2-proxy.nix + ./n8n.nix ]; } diff --git a/hosts/h001/mods/n8n.nix b/hosts/h001/mods/n8n.nix new file mode 100644 index 0000000..33581f4 --- /dev/null +++ b/hosts/h001/mods/n8n.nix @@ -0,0 +1,33 @@ +{ + ... +}: +let + port = 5678; +in +{ + options = { }; + config = { + services.nginx.virtualHosts = { + "n8n.joshuabell.xyz" = { + locations = { + "/" = { + proxyWebsockets = true; + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:${port}"; + }; + }; + }; + }; + + # Expose litellm to my overlay network as well + networking.firewall.interfaces."tailscale0".allowedTCPPorts = [ port ]; + + services.n8n = { + enable = true; + }; + systemd.services.n8n.environment = { + # N8N_SECURE_COOKIE = "false"; + N8N_EDITOR_BASE_URL = "https://n8n.joshuabell.xyz/"; + }; + }; +} diff --git a/hosts/oracle/o001/nginx.nix b/hosts/oracle/o001/nginx.nix index 2188c0b..ace5c87 100644 --- a/hosts/oracle/o001/nginx.nix +++ b/hosts/oracle/o001/nginx.nix @@ -163,6 +163,14 @@ proxyPass = "http://100.64.0.13"; }; }; + "n8n.joshuabell.xyz" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyWebsockets = true; + proxyPass = "http://100.64.0.13"; + }; + }; "notes.joshuabell.xyz" = { enableACME = true; forceSSL = true;