feat(git): move custom config out of git module
This commit is contained in:
parent
134d6a3556
commit
522d18fea0
4 changed files with 29 additions and 26 deletions
home
26
home/git.nix
26
home/git.nix
|
@ -7,7 +7,8 @@ in
|
|||
./modules/git.nix
|
||||
];
|
||||
|
||||
programs.git.custom = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
private = {
|
||||
name = "Felix Tenley";
|
||||
|
@ -23,5 +24,28 @@ in
|
|||
};
|
||||
};
|
||||
defaultProfile = "private";
|
||||
|
||||
ignores = [".direnv"];
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
rebase = {
|
||||
autoStash = true;
|
||||
autoSquash = true;
|
||||
abbreviateCommands = true;
|
||||
missingCommitsCheck = "warn";
|
||||
};
|
||||
};
|
||||
aliases = {
|
||||
mr = "!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
||||
pr = "!sh -c 'git fetch $1 refs/pull/$2/head:pr/$1 && git checkout pr/$2'";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue