summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-01-21 07:53:56 +0100
committerRory& <root@rory.gay>2026-01-21 07:53:56 +0100
commitbdf08b758f1bc1f2f0fe2a06e878f517ca093f7c (patch)
treeff07f2c69b431756f1dbb3ea76c2d039ac99708a
parentQuick and dirty util scripts, trim node modules (diff)
downloadserver-ts-bdf08b758f1bc1f2f0fe2a06e878f517ca093f7c.tar.xz
Nix: remove dependency on postgres service if host isnt running it
-rw-r--r--nix/modules/default/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix

index d39919c3..093087fa 100644 --- a/nix/modules/default/default.nix +++ b/nix/modules/default/default.nix
@@ -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 // {