From 0cf16198a85c02311315ce4901e11b96e36a0134 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 23 Mar 2021 22:36:50 +0100 Subject: [PATCH] postgresql: set package version globally --- services/default.nix | 1 + services/matrix.nix | 1 - services/nextcloud.nix | 1 - services/postgresql.nix | 7 +++++++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 services/postgresql.nix diff --git a/services/default.nix b/services/default.nix index a8891a8..a1ae911 100644 --- a/services/default.nix +++ b/services/default.nix @@ -14,6 +14,7 @@ ./nextcloud.nix ./nginx.nix ./postgresql-backup.nix + ./postgresql.nix ./tgv.nix ./transmission.nix ./wireguard.nix diff --git a/services/matrix.nix b/services/matrix.nix index 25b5b98..404774a 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -33,7 +33,6 @@ in { config = lib.mkIf cfg.enable { services.postgresql = { enable = true; - package = pkgs.postgresql_12; }; services.postgresqlBackup = { diff --git a/services/nextcloud.nix b/services/nextcloud.nix index 1ab9924..8c87c6d 100644 --- a/services/nextcloud.nix +++ b/services/nextcloud.nix @@ -14,7 +14,6 @@ in }; config = lib.mkIf cfg.enable { - # FIXME: set postgresql package globally services.postgresql = { enable = true; diff --git a/services/postgresql.nix b/services/postgresql.nix new file mode 100644 index 0000000..a6d1f05 --- /dev/null +++ b/services/postgresql.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: +{ + # set postgresql version so we don't get any bad surprise + config.services.postgresql = { + package = pkgs.postgresql_12; + }; +}