Update rsync-local-config function
Add heimdall back to ssh config
This commit is contained in:
parent
873fa72872
commit
52c16f4107
|
@ -80,6 +80,11 @@
|
|||
};
|
||||
}];
|
||||
};
|
||||
"heimdall" = {
|
||||
user = "elitherl";
|
||||
hostname = "heimdall003.jet.uk";
|
||||
compression = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
starship = {
|
||||
|
@ -210,9 +215,9 @@
|
|||
}
|
||||
rsync-local-config () {
|
||||
HOST=$1
|
||||
for TARGET in bat emacs git starship.toml; do
|
||||
for TARGET in bat git emacs/init.el emacs/modules emacs/crafted-emacs emacs/snippets starship.toml; do
|
||||
SOURCE="${config.xdg.configHome}/$TARGET"
|
||||
TMP_TARGET=/tmp/config-$TARGET
|
||||
TMP_TARGET=/tmp/rsync-local-config
|
||||
TMP_SOURCE=$TMP_TARGET
|
||||
NIX_SED="${pkgs.gnused}/bin/sed -i 's|/nix/.*/bin/||g'"
|
||||
NIX_REPLACE="$NIX_SED $TMP_TARGET"
|
||||
|
@ -222,10 +227,10 @@
|
|||
TMP_SOURCE=$TMP_SOURCE/
|
||||
NIX_REPLACE="${pkgs.fd}/bin/fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};"
|
||||
fi
|
||||
${pkgs.rsync}/bin/rsync -avzL --exclude=".git*" $SOURCE /tmp/config-$TARGET
|
||||
${pkgs.rsync}/bin/rsync -avzL --exclude=".git*" $SOURCE $TMP_TARGET
|
||||
${pkgs.coreutils}/bin/chmod u+rw -R $TMP_SOURCE
|
||||
${pkgs.bash}/bin/sh -c "$NIX_REPLACE"
|
||||
${pkgs.rsync}/bin/rsync -avzL --exclude=".git*" $TMP_SOURCE $HOST:.config/$TARGET
|
||||
${pkgs.rsync}/bin/rsync -avzL --delete --exclude=".git*" $TMP_SOURCE $HOST:.config/$TARGET
|
||||
${pkgs.coreutils}/bin/rm -rf $TMP_SOURCE
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue