scripts.reporsync: better inlining of called executables

This commit is contained in:
Trolli Schmittlauch 2024-03-26 16:47:35 +01:00
parent 0c1730d71e
commit 92b01dc8fe
2 changed files with 5 additions and 5 deletions

View file

@ -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 --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/ # 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 fi
if [ -n "$JUMPHOST" ]; then 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 fi
for OPTI in "''${RSYNC_OPTS[@]}"; do for OPTI in "''${RSYNC_OPTS[@]}"; do
@ -63,7 +63,7 @@
echo "Syncing ''${1} to ''${RR_DEST}" echo "Syncing ''${1} to ''${RR_DEST}"
# ensure trailing slash for src to avoid recreating directory # 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() { rsyncrepo() {

View file

@ -74,8 +74,8 @@ in
# some extra shell scripts # some extra shell scripts
programs.zsh.initExtra = lib.mkAfter ( programs.zsh.initExtra = lib.mkAfter (
import ./scripts/reporsync.nix { inherit pkgs; } import ./scripts/reporsync.nix { inherit pkgs lib; }
+ import ./scripts/ssh-loop-fc.nix { inherit pkgs; } + import ./scripts/ssh-loop-fc.nix { inherit pkgs lib; }
); );
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "1password-cli" ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "1password-cli" ];