+ portUtils +metabase

This commit is contained in:
m3tam3re
2025-09-29 15:44:25 +02:00
parent 7cf5f7d06f
commit c11847206f
18 changed files with 317 additions and 109 deletions

View File

@@ -1,25 +1,35 @@
{config, ...}: {
services.n8n = {
{
config,
lib,
...
}: let
serviceName = "n8n";
portUtils = import ../../../lib/port-utils.nix {inherit lib;};
servicePort = portUtils.getPort serviceName "AZ-CLD-1";
in {
services.${serviceName} = {
enable = true;
webhookUrl = "https://wf.az-group.com";
webhookUrl = "https://wf.az-gruppe.com";
};
systemd.services.n8n.serviceConfig = {
EnvironmentFile = ["${config.age.secrets.n8n-env.path}"];
systemd.services.${serviceName}.serviceConfig = {
EnvironmentFile = config.age.secrets.n8n-env.path;
};
# Traefik configuration specific to n8n
# Traefik configuration
services.traefik.dynamicConfigOptions.http = {
services.n8n.loadBalancer.servers = [
services.${serviceName}.loadBalancer.servers = [
{
url = "http://localhost:5678/";
url = "http://localhost:${toString servicePort}/";
}
];
routers.n8n = {
routers.${serviceName} = {
rule = "Host(`wf.az-gruppe.com`)";
tls = {
certResolver = "ionos";
};
service = "n8n";
service = serviceName;
entrypoints = "websecure";
};
};