Refactor
All checks were successful
/ check (push) Successful in 1m45s

This commit is contained in:
Oliver Davies 2025-07-12 16:33:50 +01:00
parent 19dbcc89f4
commit a620888277

View file

@ -1,13 +1,15 @@
{ lib, pkgs, ... }:
{ pkgs, ... }:
pkgs.writeShellApplication {
name = "backup-websites";
runtimeInputs = with pkgs; [ rsync ];
text = ''
backup_path="''${HOME}/server-backup"
backup_path="''$HOME/server-backup"
mkdir -p "''${backup_path}"
mkdir -p "''$backup_path"
${lib.getExe pkgs.rsync} -avzP nixedo.local:/var/www/vhosts/ "''${backup_path}" --delete-after
rsync -avzP nixedo.oliverdavies.uk:/var/www/vhosts/ "''$backup_path" --delete-after
'';
}