From 69542f257e76eaa6840b06ec395c96f448d31279 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 9 Mar 2017 21:24:45 +0100 Subject: Postgresql schema --- bragi.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bragi.nix b/bragi.nix index c4a10e83..ed60b241 100644 --- a/bragi.nix +++ b/bragi.nix @@ -360,9 +360,12 @@ in rec { services.postgresql = { enable = true; authentication = lib.mkForce '' - local sameuser all peer - local postgres all peer - local all root,@admins peer + local all all peer + ''; + initialScript = '' + CREATE DATABASE thermoprint; + CREATE USER thermoprint; + GRANT ALL ON DATABASE thermoprint TO thermoprint; ''; }; -- cgit v1.2.3