-u rsync-backup@$FS_LABEL"
'' + " %I";
};
- Install = {
- WantedBy = [ "graphical-session.target" ];
- };
};
systemd.user.services."rsync-backup@" = {
Unit = {
ExecStart = pkgs.writeShellScript "rsync-backup" ''
FS_LABEL=$1
set -eux
- DEVICE=$(${pkgs.util-linux}/bin/blkid -l -o device -t LABEL="$FS_LABEL")
- ${pkgs.glib}/bin/gio mount --device "$DEVICE"
+ # FIXME: utillinux -> unit-linux when updating to 20.05
+ DEVICE=$(${pkgs.utillinux}/bin/blkid -l -o device -t LABEL="$FS_LABEL")
+ while ! ${pkgs.glib}/bin/gio mount --device "$DEVICE"
+ do test ! -d /run/media/sevy/"$FS_LABEL" || break
+ sleep 1
+ done
${pkgs.rsync}/bin/rsync --verbose --itemize-changes \
--partial --recursive --times \
--compress-level=0 --delete --delete-before \