diff --git a/home/scripts/default.nix b/home/scripts/default.nix index da91b4a4..baf9ac0f 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -4,6 +4,8 @@ (builtins.readFile ./nixos-upgrade.sh)) (pkgs.writeShellScriptBin "git-sync-all" (builtins.readFile ./git-sync-all.sh)) + (pkgs.writeShellScriptBin "emacs-sync-config" + (builtins.readFile ./emacs-sync-config.sh)) (pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./rsync-local-config.sh)) (pkgs.writeShellScriptBin "xdg-query-program" diff --git a/home/scripts/emacs-sync-config.sh b/home/scripts/emacs-sync-config.sh new file mode 100644 index 00000000..d8647202 --- /dev/null +++ b/home/scripts/emacs-sync-config.sh @@ -0,0 +1,8 @@ +EMACS_DIR="$HOME/.emacs.d" +EMACS_CONF_URL="https://git.xenia.me.uk/xenia/emacs" + +if [ ! -d "$EMACS_DIR" ]; then + git clone "$EMACS_CONF_URL" "$EMACS_DIR" +fi + +git -C "$EMACS_DIR" pull --ff-only