mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 23:22:40 +02:00
fix: 'programs.git' do not take effect
This commit is contained in:
+12
-2
@@ -1,7 +1,17 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
@@ -12,8 +22,8 @@
|
|||||||
includes = [
|
includes = [
|
||||||
{
|
{
|
||||||
# use diffrent email & name for work
|
# use diffrent email & name for work
|
||||||
path = "~/mobiuspace/.gitconfig";
|
path = "~/work/.gitconfig";
|
||||||
condition = "gitdir:~/mobiuspace/";
|
condition = "gitdir:~/work/";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user