nixos/n8n: improve environment type
This commit is contained in:
@@ -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
@@ -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")
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user