Move contents of sync-emacs into sync-git
This commit is contained in:
parent
6077814878
commit
2298a9264f
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "sync-git" (builtins.readFile ./shell/sync-git.sh))
|
||||
(pkgs.writeShellScriptBin "sync-emacs" (builtins.readFile ./shell/sync-emacs.sh))
|
||||
(pkgs.writeShellScriptBin "ensure-pass" (builtins.readFile ./shell/ensure-pass.sh))
|
||||
(pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh))
|
||||
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# Clone ~/.config/emacs/ if it doesn't exist
|
||||
EMACS_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
|
||||
if [ -d "$EMACS_DIR" ]; then
|
||||
git -C "$EMACS_DIR" pull --ff --ff-only
|
||||
else
|
||||
git clone "https://git.xenia.me.uk/pixelifytica/emacs.git" "$EMACS_DIR"
|
||||
fi
|
||||
# Cleanup legacy Emacs config file/directory
|
||||
[ -f "$HOME/.emacs" ] && rm "$HOME/.emacs"
|
||||
[ -d "$HOME/.emacs.d" ] && rm -r "$HOME/.emacs.d"
|
|
@ -29,3 +29,17 @@ for i in "${!SYNC_DIRS[@]}"; do
|
|||
git status --porcelain
|
||||
)
|
||||
done
|
||||
|
||||
# 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
|
||||
else
|
||||
git clone "$EMACS_URL" "$EMACS_DIR"
|
||||
fi
|
||||
|
||||
# Cleanup legacy Emacs config file/directory
|
||||
[ -f "$HOME/.emacs" ] && rm "$HOME/.emacs"
|
||||
[ -d "$HOME/.emacs.d" ] && rm -r "$HOME/.emacs.d"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
./starship.nix
|
||||
];
|
||||
home.shellAliases = {
|
||||
sync-all = "sync-emacs; sync-git; vdirsyncer sync; mbsync -a";
|
||||
sync-all = "sync-git; vdirsyncer sync; mbsync -a";
|
||||
sync-and-shutdown = "sync-all && shutdown now";
|
||||
protonup = "sudo wg-quick up protonvpn && sudo wg";
|
||||
protondown = "sudo wg-quick down protonvpn";
|
||||
|
|
Loading…
Reference in a new issue