diff --git a/nextcloud.nix b/nextcloud.nix index fa9c239..5a34596 100644 --- a/nextcloud.nix +++ b/nextcloud.nix @@ -19,9 +19,9 @@ in }; systemd.services."nextcloud-backup" = { - script = '' + script = with pkgs; '' set -eu - ${pkgs.postgresql}/bin/pg_dump "nextcloud" -f /tmp/dump.sql + ${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/dump.sql" ''; serviceConfig = { Type = "oneshot";