Add iDevice backups

This commit is contained in:
Andreas Zweili 2022-06-07 21:07:01 +02:00
parent 315517268a
commit e9264ee5eb
2 changed files with 23 additions and 0 deletions

View File

@ -13,6 +13,7 @@
./software/git
./software/grobi
./software/keeweb
./software/libimobiledevice
./software/mime-apps
./software/mpv
./software/nitrogen

View File

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
libimobiledevice
];
home.shellAliases = {
iphone-backup = ''
backup_dir=~/Downloads/$(date -I)_iphone &&
mkdir -p $backup_dir &&
idevicebackup2 backup $backup_dir &&
zip -r $backup_dir.zip $backup_dir &&
rm -r $backup_dir
'';
ipad-backup = ''
backup_dir=~/Downloads/$(date -I)_ipad &&
mkdir -p $backup_dir &&
idevicebackup2 backup $backup_dir &&
zip -r $backup_dir.zip $backup_dir &&
rm -r $backup_dir
'';
};
}