2024-07-03 07:15:39 +01:00
|
|
|
HOSTS=("$@")
|
|
|
|
# Config files
|
2024-07-16 07:45:17 +01:00
|
|
|
for TARGET in ".inputrc" ".config/bat/" ".config/starship.toml"; do
|
|
|
|
SOURCE="$HOME/$TARGET"
|
2024-07-03 07:15:39 +01:00
|
|
|
echo "--- $SOURCE ---"
|
|
|
|
TMP_TARGET=/tmp/rsync-local-config
|
|
|
|
TMP_SOURCE=$TMP_TARGET
|
|
|
|
NIX_SED="sed -i 's|/nix/.*/bin/||g'"
|
|
|
|
NIX_REPLACE="$NIX_SED $TMP_TARGET"
|
|
|
|
if [[ -e $SOURCE ]]; then
|
|
|
|
if [[ -d $SOURCE ]]; then
|
|
|
|
SOURCE=$SOURCE/
|
|
|
|
TMP_SOURCE=$TMP_SOURCE/
|
|
|
|
NIX_REPLACE="fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};"
|
|
|
|
fi
|
|
|
|
rsync -avzL --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$SOURCE" $TMP_TARGET
|
|
|
|
sh -c "$NIX_REPLACE"
|
|
|
|
for HOST in "${HOSTS[@]}"; do
|
2024-07-16 07:45:17 +01:00
|
|
|
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE "$HOST:$TARGET"
|
2024-07-03 07:15:39 +01:00
|
|
|
done
|
|
|
|
rm -rf $TMP_SOURCE
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fonts
|
|
|
|
IOSEVKA_FLAKE_URL="git+https://git.xenia.me.uk/pixelifytica/iosevka.git?ref=main"
|
2024-07-31 13:51:31 +01:00
|
|
|
IOSEVKA_CUSTOM_NERDFONT=$(nix path-info "$IOSEVKA_FLAKE_URL#packages.x86_64-linux.iosevka-custom-nerdfont")
|
|
|
|
IOSEVKA_CUSTOM_AILE=$(nix path-info "$IOSEVKA_FLAKE_URL#packages.x86_64-linux.iosevka-custom-aile")
|
2024-07-03 07:15:39 +01:00
|
|
|
echo "--- Fonts ---"
|
|
|
|
for HOST in "${HOSTS[@]}"; do
|
2024-07-31 13:51:31 +01:00
|
|
|
rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$IOSEVKA_CUSTOM_NERDFONT/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomNerdFont"
|
|
|
|
rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$IOSEVKA_CUSTOM_AILE/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomAile"
|
2024-07-03 07:15:39 +01:00
|
|
|
done
|