fix(modules/dgn-console): Only try to create the psql migrate script if postgres is enabled

This commit is contained in:
Tom Hubrecht 2024-01-10 14:59:39 +01:00
parent df8831301f
commit 50368c56dd

View file

@ -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