modules: services: add postgresql

Enable the service itself in other modules when needed, but pin the
package in a single place.
This commit is contained in:
Bruno BELANYI 2021-07-29 12:05:51 +02:00
parent 820b52314f
commit 9f00d8a38e
4 changed files with 20 additions and 1 deletions

View file

@ -63,7 +63,6 @@ in
config = lib.mkIf cfg.enable {
services.postgresql = {
enable = true;
package = pkgs.postgresql_12;
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"