configure git via home-manager
contact addresses have been defined in non-public submodule
This commit is contained in:
parent
1c715f0cd3
commit
d238392d5a
2 changed files with 51 additions and 1 deletions
|
@ -321,4 +321,54 @@ in
|
|||
services.lorri.enable = true;
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs.git =
|
||||
let contacts = import ./secrets/contacts.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
includes = [
|
||||
{
|
||||
condition = "gitdir:~/Seafile/Studium/";
|
||||
contents = {
|
||||
user.name = contacts.realName;
|
||||
user.email = contacts.uniMail;
|
||||
};
|
||||
}
|
||||
{
|
||||
condition = "gitdir:~/src/nixpkgs/";
|
||||
contents = {
|
||||
user.name = "Trolli Schmittlauch";
|
||||
user.email = contacts.nixosMail;
|
||||
};
|
||||
}
|
||||
]
|
||||
# set default name for several other common locations
|
||||
++ map
|
||||
(dir: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents = {
|
||||
user.name = "Trolli Schmittlauch";
|
||||
user.email = contacts.mainMail;
|
||||
};
|
||||
}) [ "~/src/" "~/bin/" "~/tmp/" "~/nixconfigs/" ];
|
||||
extraConfig = {
|
||||
credential.helper = "cache";
|
||||
push.default = "simple";
|
||||
diff.tool = "vimdiff";
|
||||
merge.tool = "vimdiff";
|
||||
core.excludesfile = toString (pkgs.writeText ".gitignore_global" ''
|
||||
# Direnv stuff
|
||||
.direnv
|
||||
.envrc
|
||||
# Editor files #
|
||||
################
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
'');
|
||||
};
|
||||
lfs.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue