summaryrefslogtreecommitdiff
path: root/hosts/surtr/postgres.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-24 20:59:41 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-24 20:59:41 +0100
commit522c8a27dbde0d337c40aa05597c43df05f5ff8f (patch)
treea9f5457a6a1c37f7df2e2815c79e2e0cdd6e5b67 /hosts/surtr/postgres.nix
parent026ea0b58ce6f7521090ec3dadd6ae10cdf7e66c (diff)
downloadnixos-522c8a27dbde0d337c40aa05597c43df05f5ff8f.tar
nixos-522c8a27dbde0d337c40aa05597c43df05f5ff8f.tar.gz
nixos-522c8a27dbde0d337c40aa05597c43df05f5ff8f.tar.bz2
nixos-522c8a27dbde0d337c40aa05597c43df05f5ff8f.tar.xz
nixos-522c8a27dbde0d337c40aa05597c43df05f5ff8f.zip
surtr: synapse.li: ...
Diffstat (limited to 'hosts/surtr/postgres.nix')
-rw-r--r--hosts/surtr/postgres.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/hosts/surtr/postgres.nix b/hosts/surtr/postgres.nix
new file mode 100644
index 00000000..e8ea73be
--- /dev/null
+++ b/hosts/surtr/postgres.nix
@@ -0,0 +1,20 @@
1{ pkgs, ... }:
2{
3 config = {
4 services.postgresql = {
5 enable = true;
6 package = pkgs.postgresql_14;
7 ensureDatabases = [
8 "matrix-synapse"
9 ];
10 ensureUsers = [
11 { name = "matrix-synapse";
12 ensurePermissions = {
13 "DATABASE \"matrix-synapse\"" = "ALL PRIVILEGES";
14 "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
15 };
16 }
17 ];
18 };
19 };
20}