fix: 'programs.git' do not take effect

This commit is contained in:
Ryan Yin
2023-06-05 04:31:16 +08:00
parent f083f74825
commit a42c8f0aeb

View File

@@ -1,7 +1,17 @@
{
config,
lib,
pkgs,
...
}: {
# `programs.git` will generate the config file: ~/.config/git/config
# 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 ~/.gitconfig
'';
programs.git = {
enable = true;
lfs.enable = true;
@@ -12,8 +22,8 @@
includes = [
{
# use diffrent email & name for work
path = "~/mobiuspace/.gitconfig";
condition = "gitdir:~/mobiuspace/";
path = "~/work/.gitconfig";
condition = "gitdir:~/work/";
}
];