summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-27 20:26:19 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-27 20:30:10 +0200
commitace332eb36fd537c9a2674d591fd5e723f8fcb62 (patch)
tree3970da3c3064e0daf321a973ff14182bb2597b90 /nixos/modules/services/databases
parenta5b83c357319c4442c94979cb3679d41d9b352bc (diff)
downloadnixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar.gz
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar.bz2
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar.lz
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar.xz
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.tar.zst
nixlib-ace332eb36fd537c9a2674d591fd5e723f8fcb62.zip
Set a default value for services.postgresql.package
This is finally possible now that we have ‘system.stateVersion’
(allowing the default package to change over time).
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/postgresql.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 4cff2818f3bf..bae088c6610e 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!