nixos/mastodon: make robust for cases where postgresql isn't enabled on the host

E.g. when a remote PostgreSQL database is used

Apparently you can't access the services.postgresql.package value
anymore if postgresql isn't enabled?
This commit is contained in:
Kerstin Humm 2025-06-18 13:56:00 +02:00 committed by Kerstin
parent c7a677857a
commit ed0af3bf25

View File

@ -973,7 +973,7 @@ in
'';
path = [
cfg.package
config.services.postgresql.package
(if databaseActuallyCreateLocally then config.services.postgresql.package else pkgs.postgresql)
];
environment =
env