diff --git a/home/base/core/git.nix b/home/base/core/git.nix index 73896236..a0062d59 100644 --- a/home/base/core/git.nix +++ b/home/base/core/git.nix @@ -1,5 +1,4 @@ { - config, lib, pkgs, myvars, @@ -10,8 +9,10 @@ # to make git use this config file, `~/.gitconfig` should not exist! # # https://git-scm.com/docs/git-config#Documentation/git-config.txt---global - home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore [ "checkLinkTargets" ] '' - rm -f ${config.home.homeDirectory}/.gitconfig + home.activation.backupExistingGitconfig = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + if [[ -e ~/.gitconfig ]]; then + run mv $VERBOSE_ARG ~/.gitconfig ~/.gitconfig.bak + fi ''; # GitHub CLI tool