diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-24 21:20:44 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-02-24 21:20:44 +0100 |
commit | a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54 (patch) | |
tree | 81c528fa3b1001eabbab0f95f4c6ff2b0f8a4d95 /hosts/surtr/postgresql.nix | |
parent | 522c8a27dbde0d337c40aa05597c43df05f5ff8f (diff) | |
download | nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.gz nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.bz2 nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.tar.xz nixos-a3a98ec3f2ea88bafccd4a9a7a3720a7ddcd4a54.zip |
surtr: synapse.li: ...
Diffstat (limited to 'hosts/surtr/postgresql.nix')
-rw-r--r-- | hosts/surtr/postgresql.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix new file mode 100644 index 00000000..f0cb155b --- /dev/null +++ b/hosts/surtr/postgresql.nix | |||
@@ -0,0 +1,15 @@ | |||
1 | { pkgs, ... }: | ||
2 | { | ||
3 | config = { | ||
4 | services.postgresql = { | ||
5 | enable = true; | ||
6 | package = pkgs.postgresql_14; | ||
7 | initalScript = pkgs.writeText "schema.sql" '' | ||
8 | CREATE DATABASE "matrix-synapse" WITH ENCODING "UTF8" LOCALE "C"; | ||
9 | CREATE USER "matrix-synapse"; | ||
10 | GRANT ALL PRIVILEGES ON DATABASE "matrix-synapse" TO "matrix-synapse"; | ||
11 | GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "matrix-synapse"; | ||
12 | ''; | ||
13 | }; | ||
14 | }; | ||
15 | } | ||