From dd66f172cd1a088657da71bc6f9718180298080d Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 8 Feb 2026 23:05:16 -0600 Subject: [PATCH] Add DB init script to create PostGIS extension --- hosts/h001/containers/dawarich.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/h001/containers/dawarich.nix b/hosts/h001/containers/dawarich.nix index ea70d61e..5398d5d3 100644 --- a/hosts/h001/containers/dawarich.nix +++ b/hosts/h001/containers/dawarich.nix @@ -182,6 +182,11 @@ in host all all fc00::1/128 trust ''; ensureDatabases = [ "dawarich" ]; + # Pre-create postgis extension as superuser (dawarich user can't create extensions) + initialScript = pkgs.writeText "dawarich-pg-init.sql" '' + \connect dawarich + CREATE EXTENSION IF NOT EXISTS postgis; + ''; ensureUsers = [ { name = "dawarich";