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;