From 50368c56dda3ae219ca6a69b1e71343f8654b946 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 10 Jan 2024 14:59:39 +0100 Subject: [PATCH] fix(modules/dgn-console): Only try to create the psql migrate script if postgres is enabled --- modules/dgn-console.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/dgn-console.nix b/modules/dgn-console.nix index 28347b7..38bab7d 100644 --- a/modules/dgn-console.nix +++ b/modules/dgn-console.nix @@ -71,7 +71,8 @@ in { hardware.enableRedistributableFirmware = true; environment.systemPackages = (with pkgs; [ neovim wget kitty.terminfo ]) - ++ lib.optional (config.services.postgresql.package != cfg.pg-upgrade-to) + ++ lib.optional (config.services.postgresql.enable + && config.services.postgresql.package != cfg.pg-upgrade-to) (pkgs.writeScriptBin "upgrade-pg-cluster" '' set -eux # XXX it's perhaps advisable to stop all services that depend on postgresql