-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit.nix
More file actions
37 lines (37 loc) · 1.11 KB
/
Copy pathgit.nix
File metadata and controls
37 lines (37 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ config, ... }:
let
inherit (config.host) owner;
in
{
programs.git = {
enable = true;
config = {
user = {
email = "ndavidq0@gmail.com";
name = "Nuno David";
signingkey = "/home/${owner}/.ssh/sig_commits";
};
commit.gpgsign = true;
gpg = {
format = "ssh";
ssh = {
allowedSignersFile = "/home/${owner}/.config/git/allowed_signers";
};
};
init.defaultBranch = "main";
status.showUntrackedFiles = "normal";
rebase = {
autoSquash = true;
autoStash = true;
};
push.default = "current";
fetch.prune = true;
alias = {
l = ''log --pretty=format:"%C(auto)%h%d%C(reset) %C(blue)%cn %C(cyan)[%cr]%C(reset) %s"'';
lg = ''log --graph --pretty=format:"%C(auto)%h%d%C(reset) %C(blue)%cn %C(cyan)[%cr]%C(reset) %s"'';
ld = ''log --pretty=format:"%C(auto)%H%d%C(reset) %C(blue)%cn %C(cyan)[%cd]%C(reset) %s"'';
lplus = ''log --stat --oneline --pretty=format:"%C(auto)%H%d%C(reset) %C(blue)%cn %C(cyan)[%cr; %cd]%C(reset)%n%C(#F1502F)%B"'';
};
};
};
}