Nix: remove dependency on postgres service if host isnt running it

This commit is contained in:
Rory&
2026-01-21 07:53:56 +01:00
parent 00b2a18cdb
commit bdf08b758f

View File

@@ -223,7 +223,8 @@ in
systemd.services.spacebar-apply-migrations = makeServerTsService {
description = "Spacebar Server - Apply DB migrations";
after = [ "network-online.target" "postgresql.service" ];
after = [ "network-online.target" ] ++ lib.optional config.services.postgresql.enable "postgresql.service";
requires = lib.optional config.services.postgresql.enable "postgresql.service";
environment = builtins.mapAttrs (_: val: builtins.toString val) (
cfg.extraEnvironment
// {