scripts.reporsync: better inlining of called executables
This commit is contained in:
parent
0c1730d71e
commit
92b01dc8fe
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
''
|
||||
# rsync -rlptzv --progress --delete --exclude=.git --exclude=.vscode --exclude=result --exclude=channels/ /Users/os/src/fc.qemu os@hydra01:
|
||||
# rsync -rlptzv --progress --rsh="ssh -J fcio-whq-jump" --delete --exclude=.git --exclude=.vscode --exclude=result --exclude=channels/ /Users/os/src/fc-nixos/ os@patty:fc-nixos/
|
||||
|
@ -50,7 +50,7 @@
|
|||
fi
|
||||
|
||||
if [ -n "$JUMPHOST" ]; then
|
||||
RSYNC_OPTS+=("--rsh=/Users/os/.nix-profile/bin/ssh -J ''${JUMPHOST}")
|
||||
RSYNC_OPTS+=("--rsh=${lib.getExe pkgs.openssh} -J ''${JUMPHOST}")
|
||||
fi
|
||||
|
||||
for OPTI in "''${RSYNC_OPTS[@]}"; do
|
||||
|
@ -63,7 +63,7 @@
|
|||
echo "Syncing ''${1} to ''${RR_DEST}…"
|
||||
|
||||
# ensure trailing slash for src to avoid recreating directory
|
||||
${pkgs.rsync}/bin/rsync "''${RSYNC_OPTS[@]}" "''${1}/" "''${RR_DEST}"
|
||||
${lib.getExe pkgs.rsync} "''${RSYNC_OPTS[@]}" "''${1}/" "''${RR_DEST}"
|
||||
}
|
||||
|
||||
rsyncrepo() {
|
||||
|
|
|
@ -74,8 +74,8 @@ in
|
|||
|
||||
# some extra shell scripts
|
||||
programs.zsh.initExtra = lib.mkAfter (
|
||||
import ./scripts/reporsync.nix { inherit pkgs; }
|
||||
+ import ./scripts/ssh-loop-fc.nix { inherit pkgs; }
|
||||
import ./scripts/reporsync.nix { inherit pkgs lib; }
|
||||
+ import ./scripts/ssh-loop-fc.nix { inherit pkgs lib; }
|
||||
);
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "1password-cli" ];
|
||||
|
|
Loading…
Reference in a new issue