add (test): add test git configuration
This commit is contained in:
parent
3cf719b609
commit
3e5ea47cea
1 changed files with 37 additions and 0 deletions
37
users/geekiot/home/dev/git.nix
Normal file
37
users/geekiot/home/dev/git.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
userData,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
userName = userData.info.userName;
|
||||||
|
userEmail = userData.info.email;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
lfs.enable = true;
|
||||||
|
inherit userName userEmail;
|
||||||
|
aliases = {
|
||||||
|
aa = "add --all";
|
||||||
|
cm = "commit -m";
|
||||||
|
ch = "checkout";
|
||||||
|
br = "branch";
|
||||||
|
s = "status";
|
||||||
|
uncommit = "reset --soft HEAD^";
|
||||||
|
unadd = "reset";
|
||||||
|
ds = "diff --staged";
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
init = {
|
||||||
|
defaultbranch = "main";
|
||||||
|
};
|
||||||
|
branch = {
|
||||||
|
soft = "-committerdate";
|
||||||
|
};
|
||||||
|
pull.rebase = true;
|
||||||
|
diff.sopsdiffer.textconv = "sops --decrypt --config /dev/null";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in a new issue