From ace332eb36fd537c9a2674d591fd5e723f8fcb62 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Jul 2015 20:26:19 +0200 Subject: [PATCH] Set a default value for services.postgresql.package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is finally possible now that we have ‘system.stateVersion’ (allowing the default package to change over time). --- nixos/modules/services/databases/postgresql.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 4cff2818f3b..bae088c6610 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -154,6 +154,12 @@ in config = mkIf config.services.postgresql.enable { + services.postgresql.package = + # Note: when changing the default, make it conditional on + # ‘system.stateVersion’ to maintain compatibility with existing + # systems! + mkDefault pkgs.postgresql94; + services.postgresql.authentication = mkAfter '' # Generated file; do not edit!