Compare commits
2 Commits
068f47e9a2
...
2cb07c45a7
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cb07c45a7 | |||
| 8fe6382c48 |
@@ -30,6 +30,9 @@
|
||||
homepage-dashboard = {
|
||||
enable = true;
|
||||
};
|
||||
n8n = {
|
||||
enable = true;
|
||||
};
|
||||
bazarr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
./server/sonarr
|
||||
./server/jellyseerr
|
||||
./server/jellyfin
|
||||
./server/n8n
|
||||
./server/podman
|
||||
./server/unbound
|
||||
./server/uptime-kuma
|
||||
|
||||
@@ -23,7 +23,7 @@ in {
|
||||
};
|
||||
homepage.description = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Open Source Identity and Access Management";
|
||||
default = "An open-source IdP for modern SSO";
|
||||
};
|
||||
homepage.icon = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
||||
64
modules/server/n8n/default.nix
Normal file
64
modules/server/n8n/default.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
unit = "n8n";
|
||||
srv = config.server;
|
||||
cfg = config.server.${unit};
|
||||
in {
|
||||
options.server.${unit} = {
|
||||
enable = lib.mkEnableOption {
|
||||
description = "Enable ${unit}";
|
||||
};
|
||||
configDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/var/lib/${unit}";
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${unit}.${srv.domain}";
|
||||
};
|
||||
homepage.name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "n8n";
|
||||
};
|
||||
homepage.description = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "A workflow automation platform";
|
||||
};
|
||||
homepage.icon = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "n8n.svg";
|
||||
};
|
||||
homepage.category = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Services";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
n8n = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
traefik = {
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
services.n8n.loadBalancer.servers = [{url = "http://127.0.0.1:5678";}];
|
||||
routers = {
|
||||
n8n = {
|
||||
entryPoints = ["websecure"];
|
||||
rule = "Host(`${cfg.url}`)";
|
||||
service = "n8n";
|
||||
tls.certResolver = "letsencrypt";
|
||||
# middlewares = ["authentik"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user