blob: 0e4b805aa1f9437299be25d282977c6ce2be5dce (
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
39
40
41
|
{
config,
lib,
pkgs,
osConfig,
...
}:
let
cfg = config.hm.conf.git;
isOCI = osConfig.networking.hostName == "oci";
in
{
options.hm.conf.git.enable = lib.mkEnableOption "enables git vcs";
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
lfs.enable = true;
signing = {
signByDefault = true;
key = if isOCI then "~/.ssh/id_ed25519.pub" else "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94";
};
settings = {
user = {
name = "adikro";
email = "adikro@disroot.org";
};
gpg.format = if isOCI then "ssh" else "openpgp";
init.defaultBranch = "main";
push.autoSetupRemote = true;
pull.rebase = true;
"url \"git@codeberg.org:\"".insteadOf = "https://codeberg.org/";
};
ignores = [
"*.swp"
"result"
".direnv/"
"secrets/*.tmp"
];
};
};
}
|