From 235a678a7c738bf9092461e61c77a25abf455621 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 8 Mar 2024 08:07:51 +0000 Subject: [PATCH] Pull emacs (and nixos) config in git-sync-all instead of hyprland startup --- home/hyprland/default.nix | 1 - home/scripts/git-sync-all.sh | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index f09bffc8..9a092061 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -347,7 +347,6 @@ extraConfig = '' exec-once = systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME exec-once = systemctl --user restart "xdg-desktop-portal*" - exec-once = ${pkgs.git}/bin/git -C ${config.xdg.configHome}/emacs pull --ff-only ''; }; xdg.configFile = { diff --git a/home/scripts/git-sync-all.sh b/home/scripts/git-sync-all.sh index 74975023..2a15362a 100755 --- a/home/scripts/git-sync-all.sh +++ b/home/scripts/git-sync-all.sh @@ -1,3 +1,4 @@ +# Sync common directories, setting url to ensure it's up-to-date first SYNC_DIRS=( "$HOME/.password-store/" "$HOME/.elfeed/" @@ -24,3 +25,7 @@ for i in "${!SYNC_DIRS[@]}"; do git-sync -ns ) done + +# Pull NixOS and Emacs config if simple fast-forward +git -C /etc/nixos pull --ff-only +git -C "${XDG_CONFIG_HOME:-$HOME/.config}/emacs" pull --ff-only