From c53745df899d5235895e0350782a51a19665cbe3 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 15 Jul 2024 23:13:39 +0200 Subject: [PATCH] VEGAS/api: drop --- hosts/VEGAS/services/api/default.nix | 40 ---------------------------- hosts/VEGAS/system.nix | 1 - 2 files changed, 41 deletions(-) delete mode 100644 hosts/VEGAS/services/api/default.nix diff --git a/hosts/VEGAS/services/api/default.nix b/hosts/VEGAS/services/api/default.nix deleted file mode 100644 index 897acb7..0000000 --- a/hosts/VEGAS/services/api/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, lib, depot, ... }: -let - inherit (depot.lib.meta) domain; - apiAddr = "api.${domain}"; - proxyTarget = config.links.api.url; - proxy = depot.lib.nginx.vhosts.proxy proxyTarget; -in -{ - # n8n uses "Sustainable Use License" - nixpkgs.config.allowUnfree = true; - - links.api.protocol = "http"; - - services.n8n = { - enable = true; - webhookUrl = "https://${apiAddr}"; - settings = { - inherit (config.links.api) port; - }; - }; - - systemd.services.n8n.environment = { - N8N_LISTEN_ADDRESS = "127.0.0.1"; - N8N_ENDPOINT_WEBHOOK = "api"; - N8N_ENDPOINT_WEBHOOK_TEST = "test"; - }; - - services.nginx.virtualHosts."${apiAddr}" = lib.recursiveUpdate proxy { - locations."/api" = { - proxyPass = proxyTarget; - extraConfig = "auth_request off;"; - }; - locations."/test" = { - proxyPass = proxyTarget; - extraConfig = "auth_request off;"; - }; - }; - - services.oauth2-proxy.nginx.virtualHosts.${apiAddr} = { }; -} diff --git a/hosts/VEGAS/system.nix b/hosts/VEGAS/system.nix index b96afbd..acad720 100644 --- a/hosts/VEGAS/system.nix +++ b/hosts/VEGAS/system.nix @@ -15,7 +15,6 @@ depot.inputs.mms.module # Services - ./services/api ./services/backbone-routing ./services/bitwarden ./services/cdn-shield