Migrate the libimobiledevice to a normal module
The reason is because I want to have the usbmuxd service in that config as well.
This commit is contained in:
parent
315a01ede5
commit
eeb48df35a
|
@ -1,22 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
libimobiledevice
|
||||
];
|
||||
home.shellAliases = {
|
||||
iphone-backup = ''
|
||||
backup_dir=~/Downloads/$(date -I)_iphone &&
|
||||
mkdir -p $backup_dir &&
|
||||
idevicebackup2 backup $backup_dir &&
|
||||
tar cjf $backup_dir.tar.bz2 $backup_dir &&
|
||||
rm -r $backup_dir
|
||||
'';
|
||||
ipad-backup = ''
|
||||
backup_dir=~/Downloads/$(date -I)_ipad &&
|
||||
mkdir -p $backup_dir &&
|
||||
idevicebackup2 backup $backup_dir &&
|
||||
tar cjf $backup_dir.tar.bz2 $backup_dir &&
|
||||
rm -r $backup_dir
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{ custom, pkgs, ... }:
|
||||
{
|
||||
services.usbmuxd.enable = true;
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
libimobiledevice
|
||||
];
|
||||
|
||||
home-manager.users.${custom.username} = {
|
||||
home.shellAliases = {
|
||||
iphone-backup = ''
|
||||
backup_dir=~/Downloads/$(date -I)_iphone &&
|
||||
mkdir -p $backup_dir &&
|
||||
${pkgs.libimobiledevice}/bin/idevicebackup2 backup $backup_dir &&
|
||||
${pkgs.gnutar}/bin/tar cjf $backup_dir.tar.bz2 $backup_dir &&
|
||||
rm -r $backup_dir'';
|
||||
|
||||
ipad-backup = ''
|
||||
backup_dir=~/Downloads/$(date -I)_ipad &&
|
||||
mkdir -p $backup_dir &&
|
||||
${pkgs.libimobiledevice}/bin/idevicebackup2 backup $backup_dir &&
|
||||
${pkgs.gnutar}/bin/tar cjf $backup_dir.tar.bz2 $backup_dir &&
|
||||
rm -r $backup_dir'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue