Files
nixpkgs/nixos/tests/n8n.nix
Leona Maroni cf54549660 treewide: remove in-tree usages of nixpkgs.config.allowUnfree
In multiple NixOS tests, nixpkgs.config.allowUnfree or
nixpkgs.config.allowUnfreePredicate was set. This leads to Hydra building and
redistributing packages with a unfree license. This is a quite huge legal
problem. This changes removes these use cases.
2025-11-10 16:46:19 +01:00

33 lines
792 B
Nix

{ lib, ... }:
let
port = 5678;
webhookUrl = "http://example.com";
in
{
name = "n8n";
meta.maintainers = with lib.maintainers; [
freezeboy
k900
];
node.pkgsReadOnly = false;
nodes.machine =
{ ... }:
{
services.n8n = {
enable = true;
environment.WEBHOOK_URL = webhookUrl;
};
};
testScript = ''
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")
machine.succeed("grep -qF 'HOME=/var/lib/n8n' /etc/systemd/system/n8n.service")
machine.fail("grep -qF 'GENERIC_TIMEZONE=' /etc/systemd/system/n8n.service")
'';
}