mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-24 18:31:43 +01:00
fix: 'programs.git' do not take effect
This commit is contained in:
@@ -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/";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user