Enable n8n and nginx reverse proxy on nas

This commit is contained in:
Gabriel Simmer 2023-06-28 16:57:26 +01:00
parent ef2e4b7be2
commit ef210a0849
Signed by: arch
GPG key ID: C81B106D46C5B875

View file

@ -28,6 +28,10 @@
tailscale.enable = true;
openssh.enable = true;
xserver.videoDrivers = [ "nvidia" ];
n8n = {
enable = true;
openFirewall = true;
};
nfs.server.enable = true;
samba-wsdd.enable = true;
samba = {
@ -87,6 +91,36 @@
enable = true;
openFirewall = true;
};
nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
# other Nginx options
virtualHosts."n8n.gmem.ca" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;
locations."/" = {
proxyPass = "http://127.0.0.1:5678";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig =
# required when the target is also TLS server with multiple hosts
# "proxy_ssl_server_name on;" +
# required when the server wants to use HTTP Authentication
"proxy_pass_header Authorization;"
;
};
};
};
};
security.acme = {
acceptTerms = true;
defaults = { email = "acme@gmem.ca";
dnsProvider = "route53";
credentialsFile = "/Primary/gabriel/.aws/credentials";
# We don't need to wait for propagation since this is a local DNS server
};
};
networking = {