From 5d69bb9fc67123d77180d7046036f10da640a393 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 4 Dec 2020 13:54:50 -0300 Subject: default.nix: Add remotePUblishScript --- default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 84b47c4..07b828f 100644 --- a/default.nix +++ b/default.nix @@ -67,4 +67,14 @@ in rec { "$OUT_DOCS/" \ "$SERVER_URL:$REMOTE_PATH" ''; + remotePublishScript = pkgs.writeShellScriptBin "publish.sh" '' + set -euo pipefail + SERVER_URL='root@euandre.org' + REMOTE_PATH='/home/user-data/www/default/' + OUT_DOCS='${site}' + ${pkgs.rsync}/bin/rsync -avzP \ + --rsh="ssh -o StrictHostKeyChecking=no" \ + "$OUT_DOCS/" \ + "$SERVER_URL:$REMOTE_PATH" + ''; } -- cgit v1.2.3