mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
fix(git): back up a stray ~/.gitconfig after writeBoundary
Move it aside with HM's `run mv` (dry-run aware) instead of an unconditional rm before checkLinkTargets. Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
1 parent
ce49b03014
commit
4ecb7c475e
1 file changed
+4
-3
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
myvars,
|
myvars,
|
||||||
@@ -10,8 +9,10 @@
|
|||||||
# to make git use this config file, `~/.gitconfig` should not exist!
|
# to make git use this config file, `~/.gitconfig` should not exist!
|
||||||
#
|
#
|
||||||
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
||||||
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore [ "checkLinkTargets" ] ''
|
home.activation.backupExistingGitconfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
rm -f ${config.home.homeDirectory}/.gitconfig
|
if [[ -e ~/.gitconfig ]]; then
|
||||||
|
run mv $VERBOSE_ARG ~/.gitconfig ~/.gitconfig.bak
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# GitHub CLI tool
|
# GitHub CLI tool
|
||||||
|
|||||||
Reference in new issue
Block a user