From 88b8c4b3c0d35be435c0fa812b1f52c4bf3cf057 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 25 Jan 2024 23:25:17 -0800 Subject: [PATCH] Make sure lemmy user/db exist --- lemmy-container.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lemmy-container.nix b/lemmy-container.nix index aec19fe..908af21 100644 --- a/lemmy-container.nix +++ b/lemmy-container.nix @@ -100,7 +100,14 @@ in { }; services = { nscd.enable = false; - postgresql.enable = true; + postgresql = { + enable = true; + ensureUsers = [{ + name = "lemmy"; + ensureDBOwnership = true; + }]; + ensureDatabases = [ "lemmy" ]; + }; pict-rs.enable = true; lemmy = { enable = true;