nx_backup download function

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-08-31 21:27:26 +02:00
parent f4f9e36b16
commit 04b2b7da33

View File

@@ -110,6 +110,12 @@
mkdir $argv
cd $argv
'';
nx_backup = let
destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/";
in pkgs.lib.mkIf (hyper.host != "NxACE") ''
set RPATH (curl -s https://${hyper.domain}/latest-backup)
rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination}
'';
# gpg = '';
# set bold \e[1m
# set green \e[32m