diff options
author | Janik <80165193+Janik-Haag@users.noreply.github.com> | 2023-07-07 23:04:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 23:04:48 +0200 |
commit | e46ab54b68e4fdc4d179669729ad5978901992d8 (patch) | |
tree | 365ed6794e4ccaebf2d8780de563a558a9522f8b /nixos | |
parent | 7016b8bf7ada30e7574d56f0dabafdc921f00e75 (diff) | |
parent | 4656163a04a17f43b5ae9e338c944bc1c9848ce9 (diff) | |
download | nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar.gz nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar.bz2 nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar.lz nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar.xz nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.tar.zst nixlib-e46ab54b68e4fdc4d179669729ad5978901992d8.zip |
Merge pull request #241783 from gmemstr/n8n-tweaks
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/n8n.nix | 4 | ||||
-rw-r--r-- | nixos/tests/n8n.nix | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/n8n.nix b/nixos/modules/services/misc/n8n.nix index c72ed106f2d9..2af37fba910a 100644 --- a/nixos/modules/services/misc/n8n.nix +++ b/nixos/modules/services/misc/n8n.nix @@ -27,7 +27,7 @@ in }; webhookUrl = mkOption { - type = types.string; + type = types.str; default = ""; description = lib.mdDoc '' WEBHOOK_URL for n8n, in case we're running behind a reverse proxy. @@ -53,7 +53,7 @@ in N8N_USER_FOLDER = "/var/lib/n8n"; HOME = "/var/lib/n8n"; N8N_CONFIG_FILES = "${configFile}"; - WEBHOOK_URL = "${webhookUrl}"; + WEBHOOK_URL = "${cfg.webhookUrl}"; # Don't phone home N8N_DIAGNOSTICS_ENABLED = "false"; diff --git a/nixos/tests/n8n.nix b/nixos/tests/n8n.nix index 771296bf37a5..0a12192d5c71 100644 --- a/nixos/tests/n8n.nix +++ b/nixos/tests/n8n.nix @@ -1,6 +1,7 @@ import ./make-test-python.nix ({ lib, ... }: let port = 5678; + webhookUrl = "http://example.com"; in { name = "n8n"; @@ -11,6 +12,7 @@ in { services.n8n = { enable = true; + webhookUrl = webhookUrl; }; }; @@ -18,5 +20,6 @@ in machine.wait_for_unit("n8n.service") machine.wait_for_console_text("Editor is now accessible via") machine.succeed("curl --fail -vvv http://localhost:${toString port}/") + machine.succeed("grep -qF ${webhookUrl} /etc/systemd/system/n8n.service") ''; }) |