diff options
author | EuAndreh <eu@euandre.org> | 2020-12-04 13:54:50 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-04 13:54:50 -0300 |
commit | 5d69bb9fc67123d77180d7046036f10da640a393 (patch) | |
tree | c5b23c9162f1ad07df5600918573be151b8ac52c | |
parent | metadata.json -> description (diff) | |
download | euandre.org-5d69bb9fc67123d77180d7046036f10da640a393.tar.gz euandre.org-5d69bb9fc67123d77180d7046036f10da640a393.tar.xz |
default.nix: Add remotePUblishScript
Diffstat (limited to '')
-rw-r--r-- | default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
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" + ''; } |