Add zsh function to push basic config to remote server

This commit is contained in:
Evie Litherland-Smith 2023-09-28 13:46:08 +01:00
parent 0745a7936b
commit 341d7059a2

View file

@ -51,6 +51,16 @@
DEFAULT=$(xdg-mime query default $FILETYPE)
echo "$FILETYPE -> $DEFAULT"
}
rsync-local-config () {
HOST=$1
for TARGET in emacs doom starship.toml; do
SOURCE="${config.xdg.configHome}/$TARGET"
if [[ -e ${config.xdg.configHome}/$TARGET ]]; then
[[ -d $SOURCE ]] && SOURCE="$SOURCE/"
${pkgs.rsync}/bin/rsync -avzL $SOURCE $HOST:.config/$TARGET
fi
done
}
'';
oh-my-zsh = {
enable = true;