nixos-config/home-manager/modules/git.nix

55 lines
1 KiB
Nix
Raw Normal View History

2023-09-07 16:08:36 +00:00
{pkgs, ...}:{
2022-03-02 14:28:37 +00:00
programs.git = {
enable = true;
2023-09-07 16:08:36 +00:00
package = pkgs.gitSVN;
ignores = [
".vscode"
"*.sql"
"*.sql.gz"
"*.sql.zst"
".direnv/"
".venv/"
];
2022-03-02 14:28:37 +00:00
userName = "fleaz";
userEmail = "mail@felixbreidenstein.de";
signing = {
key = "9166FF9DFC1F4637";
signByDefault = true;
};
extraConfig = {
"core" = {
pager = "less -F -X";
};
"init" = {
defaultBranch = "main";
};
"pull" = {
rebase = "true";
};
"push" = {
autoSetupRemote = "true";
};
};
2022-03-02 14:28:37 +00:00
aliases = {
# checkout-pull-request from GitHub
2022-03-02 14:28:37 +00:00
cpr = "!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f";
2022-03-01 22:59:14 +00:00
};
2022-03-02 14:28:37 +00:00
includes = [{
2023-07-20 12:59:10 +00:00
condition = "gitdir:~/denic/";
2022-03-02 14:28:37 +00:00
contents = {
user = {
2023-07-20 12:59:10 +00:00
email = "breidenstein@denic.de";
2022-03-02 14:28:37 +00:00
name = "Felix Breidenstein";
};
commit = {
gpgSign = false;
};
2022-03-01 22:59:14 +00:00
};
2022-03-02 14:28:37 +00:00
}
];
2022-03-02 14:28:37 +00:00
};
2022-03-01 22:59:14 +00:00
}