From 89fb397639b1f493e83008a96219f9cc9a577fee Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Fri, 20 Jun 2025 16:48:49 +0100 Subject: [PATCH] borgmatic: only add postgres to closure if enabled --- modules/nixos/services/borgmatic.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/services/borgmatic.nix b/modules/nixos/services/borgmatic.nix index 2bcdfc7..72e5f73 100644 --- a/modules/nixos/services/borgmatic.nix +++ b/modules/nixos/services/borgmatic.nix @@ -64,7 +64,8 @@ in ]; # Add `pg_dumpall` to unit environment - systemd.services.borgmatic.path = [ config.services.postgresql.package ]; + systemd.services.borgmatic.path = + if config.services.postgresql.enable then [ config.services.postgresql.package ] else [ ]; # Without this override, `cat` is unavailable for `encryption_passcommand` systemd.services.borgmatic.confinement.fullUnit = true;