blob: 918381c49c6ddd7d6a976bbed553615a1dac56c1 (
plain)
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
38
|
{
config,
lib,
pkgs,
...
}: let
cfg = config.collinux.terminal.programs.git;
git_config = lib.mkMerge [
{
alias = {
stage = "add";
unstage = "restore --staged";
};
init.defaultBranch = "main";
user = {
email = cfg.userEmail;
name = cfg.userName;
};
}
(lib.mkIf cfg.installKey {
# commit signing
gpg.format = "ssh";
user.signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3SjzIs3YI8PWJaNrAuaEeRcTcvIVHOKyCh2VwHTHEF";
commit.gpgsign = "true";
})
];
in
lib.mkIf cfg.enable {
files = {
".config/git/config" = {
generator = lib.generators.toGitINI;
value = git_config;
};
};
packages = [pkgs.git];
}
|