From ff3d1735c0f596e808f06359b8bb0e24d1d9582c Mon Sep 17 00:00:00 2001 From: m3tam3re Date: Wed, 13 Nov 2024 10:51:59 +0100 Subject: [PATCH] +postgres n8n@1.66.0 --- hosts/m3-kratos/services/default.nix | 1 + hosts/m3-kratos/services/postgres.nix | 22 ++++++++++++++++++++++ overlays/mods/n8n.nix | 6 +++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 hosts/m3-kratos/services/postgres.nix diff --git a/hosts/m3-kratos/services/default.nix b/hosts/m3-kratos/services/default.nix index e38a8c3..7595f39 100644 --- a/hosts/m3-kratos/services/default.nix +++ b/hosts/m3-kratos/services/default.nix @@ -2,6 +2,7 @@ imports = [ ./containers ./n8n.nix + ./postgres.nix ./sound.nix ./udev.nix ]; diff --git a/hosts/m3-kratos/services/postgres.nix b/hosts/m3-kratos/services/postgres.nix new file mode 100644 index 0000000..6c4ad63 --- /dev/null +++ b/hosts/m3-kratos/services/postgres.nix @@ -0,0 +1,22 @@ +{pkgs, ...}: { + services.postgresql = { + enable = true; + package = pkgs.postgresql_17; + extraPlugins = with pkgs.postgresql17Packages; [ + pgvector + ]; + authentication = '' + local all all trust + host all all 127.0.0.1/32 trust + host all all ::1/128 trust + + host all all 10.88.0.0/16 trust + host all all 19.89.0.0/16 trust + ''; + initialScript = pkgs.writeText "initialScript.sql" '' + CREATE USER n8n WITH PASSWORD 'n8n'; + CREATE DATABASE n8n; + GRANT ALL PRIVILEGES ON DATABASE n8n TO n8n; + ''; + }; +} diff --git a/overlays/mods/n8n.nix b/overlays/mods/n8n.nix index 7ca68b3..fcd32a2 100644 --- a/overlays/mods/n8n.nix +++ b/overlays/mods/n8n.nix @@ -1,17 +1,17 @@ {prev}: prev.n8n.overrideAttrs (oldAttrs: rec { pname = oldAttrs.pname; - version = "1.63.0"; + version = "1.66.0"; src = prev.fetchFromGitHub { owner = "n8n-io"; repo = "n8n"; rev = "n8n@${version}"; - hash = "sha256-zJHveCbBPJs8qbgCsU+dgucoXpAKa7PVLH4tfdcJZlE="; + hash = "sha256-Q5n/z1BQSxj4B3LjEbhiJgLD++C/RUQ4g8yI0ngVtTg="; }; pnpmDeps = prev.pnpm.fetchDeps { inherit pname version src; - hash = "sha256-jJc1qcyR5ERYvIou3c7KeRhe8KL00fk2vLIxn538hOE="; + hash = "sha256-12pK2h8y+L2WT0f3SSLG1sq/yAIH6O08ZbPOKuEiSzs="; }; })