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"; }