docker n8n
This commit is contained in:
@@ -79,6 +79,8 @@
|
||||
pihole.enable = true;
|
||||
ollama.enable = true;
|
||||
searxng.enable = true;
|
||||
home-assistant.enable = true;
|
||||
n8n.enable = true;
|
||||
};
|
||||
|
||||
containers = {
|
||||
@@ -88,7 +90,6 @@
|
||||
nextcloud.enable = true;
|
||||
ntfy.enable = false;
|
||||
gitea.enable = true;
|
||||
n8n.enable = true;
|
||||
keycloak.enable = true;
|
||||
netbird.enable = true;
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.sysconfig.containers.n8n.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.containers.n8n.enable {
|
||||
|
||||
containers.n8n = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.21";
|
||||
|
||||
config = {
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.n8n = {
|
||||
enable = true;
|
||||
|
||||
openFirewall = true;
|
||||
environment = {
|
||||
N8N_DIAGNOSTICS_ENABLED = "false";
|
||||
N8N_VERSION_NOTIFICATIONS_ENABLED = "false";
|
||||
N8N_TEMPLATES_ENABLED = "false";
|
||||
|
||||
EXTERNAL_FRONTEND_HOOKS_URLS = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_FRONTEND = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_BACKEND = "";
|
||||
|
||||
N8N_SECURE_COOKIE = "false";
|
||||
};
|
||||
|
||||
#webhookUrl = "https://n8n.blunkall.us/";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
77
system/virtualization/docker/n8n/default.nix
Normal file
77
system/virtualization/docker/n8n/default.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.sysconfig.docker.n8n.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.sysconfig.docker.n8n.enable && config.sysconfig.docker.enable) {
|
||||
|
||||
environment.etc."resolv.conf" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
nameserver 127.0.0.1
|
||||
nameserver 1.1.1.1
|
||||
nameserver 1.0.0.1
|
||||
options edns0
|
||||
'';
|
||||
|
||||
user = "root";
|
||||
mode = "0664";
|
||||
};
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ 9001 ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.n8n = {
|
||||
image = "docker.n8n.io/n8nio/n8n";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "n8n.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.http.routers.n8n.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.n8n.rule" = "Host(`n8n.esotericbytes.com`)";
|
||||
"traefik.http.routers.n8n.service" = "n8n";
|
||||
"traefik.http.routers.n8n.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.n8n.loadbalancer.server.url" = "http://192.168.100.10:9004";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--ip=192.168.101.7"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"9004:5678"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_n8n:/etc/n8n"
|
||||
];
|
||||
|
||||
environment = {
|
||||
GENERIC_TIMEZONE = "America/Chicago";
|
||||
TZ = "America/Chicago";
|
||||
N8N_DIAGNOSTICS_ENABLED = "false";
|
||||
N8N_VERSION_NOTIFICATIONS_ENABLED = "false";
|
||||
N8N_TEMPLATES_ENABLED = "false";
|
||||
|
||||
EXTERNAL_FRONTEND_HOOKS_URLS = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_FRONTEND = "";
|
||||
N8N_DIAGNOSTICS_CONFIG_BACKEND = "";
|
||||
|
||||
N8N_SECURE_COOKIE = "false";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user