From 04b2b7da331b5a2e6aa1e153d25d3d07bf38a5bb Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sun, 31 Aug 2025 21:27:26 +0200 Subject: [PATCH] nx_backup download function --- home-modules/fish.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home-modules/fish.nix b/home-modules/fish.nix index afbf122..e6a721e 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -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