Unverified Commit 004f5e2d authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

nixos/n8n: improve environment type (#473950)

parents 9778d100 93bb2da0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -34,7 +34,13 @@ in
        See <https://docs.n8n.io/hosting/configuration/environment-variables/> for available options.
      '';
      type = lib.types.submodule {
        freeformType = with lib.types; attrsOf str;
        freeformType =
          with lib.types;
          attrsOf (oneOf [
            str
            (coercedTo int toString str)
            (coercedTo bool builtins.toJSON str)
          ]);
        options = {
          GENERIC_TIMEZONE = lib.mkOption {
            type = with lib.types; nullOr str;
+7 −1
Original line number Diff line number Diff line
@@ -14,7 +14,11 @@ in
    {
      services.n8n = {
        enable = true;
        environment.WEBHOOK_URL = webhookUrl;
        environment = {
          WEBHOOK_URL = webhookUrl;
          N8N_TEMPLATES_ENABLED = false;
          DB_PING_INTERVAL_SECONDS = 2;
        };
      };
    };

@@ -26,5 +30,7 @@ in
    machine.succeed("grep -qF 'HOME=/var/lib/n8n' /etc/systemd/system/n8n.service")
    machine.fail("grep -qF 'GENERIC_TIMEZONE=' /etc/systemd/system/n8n.service")
    machine.succeed("grep -qF 'N8N_DIAGNOSTICS_ENABLED=false' /etc/systemd/system/n8n.service")
    machine.succeed("grep -qF 'N8N_TEMPLATES_ENABLED=false' /etc/systemd/system/n8n.service")
    machine.succeed("grep -qF 'DB_PING_INTERVAL_SECONDS=2' /etc/systemd/system/n8n.service")
  '';
}