From 529d7aaa15897f7e13f376bd87e233485dbade66 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Fri, 20 Feb 2026 13:10:07 +0100 Subject: [PATCH] update: modules/fish.nix --- modules/fish.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/fish.nix b/modules/fish.nix index f8f1c99..a172436 100644 --- a/modules/fish.nix +++ b/modules/fish.nix @@ -39,19 +39,17 @@ if test "$md5_before" != (md5sum $file) echo "Changes made. Prepparing commit..." - pushd $config_dir - - git add $file - set -l rel_file (realpath --relative-to=$config_dir $file) - set commit_msg "update: $rel_file" - git commit -m "$commit_msg" - git push + if home-manager switch -b backup + pushd $config_dir + git add -A + set commit_msg "update: $rel_file" + git commit -m "$commit_msg" + git push + popd + end - home-manager switch -b backup - - popd else echo "No changes made" end