From efe1aa51dbbb67b908a71557b72ab7690b2f7f6d Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 28 Mar 2021 22:46:44 +0000 Subject: [PATCH] bvm-twitterchiver: add postgresql --- ops/nixos/bvm-twitterchiver/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ops/nixos/bvm-twitterchiver/default.nix b/ops/nixos/bvm-twitterchiver/default.nix index e58122f5c9..06b2a9db62 100644 --- a/ops/nixos/bvm-twitterchiver/default.nix +++ b/ops/nixos/bvm-twitterchiver/default.nix @@ -19,5 +19,17 @@ }; my.ip.tailscale = "100.119.86.55"; + services.postgresql = { + enable = true; + ensureDatabases = [ + "twitterchiver" + ]; + ensureUsers = [{ + name = "twitterchiver"; + ensurePermissions = { "DATABASE twitterchiver" = "ALL PRIVILEGES"; }; + }]; + }; + services.postgresqlBackup.enable = true; + system.stateVersion = "21.05"; }