Update nixos, push both nixos and emacs config when syncing

This commit is contained in:
Evie Litherland-Smith 2025-02-04 06:38:47 +00:00
parent 489e3ee6b1
commit 2aef21283d

View file

@ -1,9 +1,14 @@
# Update /etc/nixos/
git -C /etc/nixos/ pull --ff --ff-only
git -C /etc/nixos/ push
# Clone ~/.config/emacs/ if it doesn't exist, pull otherwise
EMACS_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
EMACS_URL="https://git.xenia.me.uk/pixelifytica/emacs.git"
if [ -d "$EMACS_DIR" ]; then
git -C "$EMACS_DIR" remote set-url origin "$EMACS_URL"
git -C "$EMACS_DIR" pull --ff --ff-only
git -C "$EMACS_DIR" push
else
git clone "$EMACS_URL" "$EMACS_DIR"
fi