services.n8n.environment

Environment variables to pass to the n8n service. See https://docs.n8n.io/hosting/configuration/environment-variables/ for available options.

Environment variables ending with _FILE are automatically handled as secrets: they are loaded via systemd credentials for secure access with DynamicUser=true.

This can be useful to pass secrets via tools like agenix or sops-nix.

Type
open submodule of attribute set of (string or (string or signed integer convertible to it) or (string or boolean convertible to it))
Default
{ }
Example
{
  N8N_ENCRYPTION_KEY_FILE = "/run/n8n/encryption_key";
  DB_POSTGRESDB_PASSWORD_FILE = "/run/n8n/db_postgresdb_password";
  WEBHOOK_URL = "https://n8n.example.com";
}
Declared
<nixpkgs/nixos/modules/services/misc/n8n.nix>