Add new script and it's dependencies.
This commit is contained in:
parent
720b7618a0
commit
c2a8221c7f
@ -26,5 +26,9 @@ stdenv.mkDerivation {
|
||||
# Add dependencies to the runtime for my iso2chd script
|
||||
wrapProgram $out/bin/iso2chd \
|
||||
--prefix PATH : ${lib.makeBinPath [ mame-tools ]}
|
||||
|
||||
# Add dependencies to the runtime for my sync-backup script
|
||||
wrapProgram $out/bin/sync-backup \
|
||||
--prefix PATH : ${lib.makeBinPath [ rsync cryptsetup ]}
|
||||
'';
|
||||
}
|
||||
|
13
home-manager/modules/scripts/sync-backup
Executable file
13
home-manager/modules/scripts/sync-backup
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
disk="$1"
|
||||
|
||||
sudo cryptsetup luksOpen "$disk" crypt
|
||||
|
||||
sudo mount /dev/mapper/crypt "$HOME/Documents/drive"
|
||||
|
||||
rsync -ahAXv --delete /home/crony/.local/backup/ /home/crony/Documents/drive/backup
|
||||
|
||||
sudo umount "$HOME/Documents/drive"
|
||||
|
||||
sudo cryptsetup luksClose /dev/mapper/crypt
|
Loading…
Reference in New Issue
Block a user