aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-12-04 13:54:50 -0300
committerEuAndreh <eu@euandre.org>2020-12-04 13:54:50 -0300
commit5d69bb9fc67123d77180d7046036f10da640a393 (patch)
treec5b23c9162f1ad07df5600918573be151b8ac52c
parentmetadata.json -> description (diff)
downloadeuandre.org-5d69bb9fc67123d77180d7046036f10da640a393.tar.gz
euandre.org-5d69bb9fc67123d77180d7046036f10da640a393.tar.xz
default.nix: Add remotePUblishScript
Diffstat (limited to '')
-rw-r--r--default.nix10
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"
+ '';
}