From 9e58c219460500d5f0f66378170eb5254ab8f519 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Thu, 9 Oct 2025 14:27:36 -0500 Subject: [PATCH] add postgres for fun data --- hosts/h001/mods/default.nix | 1 + hosts/h001/mods/n8n.nix | 4 ++-- hosts/h001/mods/postgresql.nix | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 hosts/h001/mods/postgresql.nix diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index 214f3c6..d75545c 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -11,5 +11,6 @@ ./trilium.nix ./oauth2-proxy.nix ./n8n.nix + ./postgresql.nix ]; } diff --git a/hosts/h001/mods/n8n.nix b/hosts/h001/mods/n8n.nix index ae23187..463919a 100644 --- a/hosts/h001/mods/n8n.nix +++ b/hosts/h001/mods/n8n.nix @@ -29,8 +29,8 @@ N8N_HOST = "n8n.joshuabell.xyz"; VUE_APP_URL_BASE_API = "https://n8n.joshuabell.xyz/"; N8N_HIRING_BANNER_ENABLED = "false"; - N8N_PUBLIC_API_DISABLED = "true"; - N8N_PUBLIC_API_SWAGGERUI_DISABLED = "true"; + # N8N_PUBLIC_API_DISABLED = "true"; + # N8N_PUBLIC_API_SWAGGERUI_DISABLED = "true"; }; }; } diff --git a/hosts/h001/mods/postgresql.nix b/hosts/h001/mods/postgresql.nix new file mode 100644 index 0000000..7397377 --- /dev/null +++ b/hosts/h001/mods/postgresql.nix @@ -0,0 +1,24 @@ +{ + pkgs, + ... +}: +{ + config = { + services.postgresql = { + enable = true; + package = pkgs.postgresql_17.withJIT; + enableJIT = true; + authentication = '' + local all all trust + host all all 127.0.0.1/8 trust + host all all ::1/128 trust + host all all fc00::1/128 trust + ''; + }; + + # Backup database + services.postgresqlBackup = { + enable = true; + }; + }; +}