2020-08-15 03:06:37 +02:00
|
|
|
{ config, pkgs, ... }:
|
2020-03-13 21:18:08 +01:00
|
|
|
|
|
|
|
{
|
2020-08-15 03:18:48 +02:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
2022-05-13 12:06:04 +02:00
|
|
|
lfs.enable = true;
|
2020-08-15 03:06:37 +02:00
|
|
|
profiles = {
|
|
|
|
private = {
|
2022-05-05 19:22:19 +02:00
|
|
|
name = "Felix Schröter";
|
2020-09-23 13:19:19 +02:00
|
|
|
email = "dev@felschr.com";
|
2022-01-20 17:00:17 +01:00
|
|
|
# use sign subkey's fingerprint: gpg2 -K --with-subkey-fingerprint
|
|
|
|
signingKey = "7E08 6842 0934 AA1D 6821 1F2A 671E 39E6 744C 807D";
|
2020-09-23 13:19:19 +02:00
|
|
|
dirs = [ "~/dev/private/" "/etc/nixos" ];
|
2020-08-15 00:10:53 +02:00
|
|
|
};
|
2020-08-15 03:06:37 +02:00
|
|
|
work = {
|
2020-09-23 13:19:19 +02:00
|
|
|
name = "Felix Schröter";
|
|
|
|
email = "fs@upsquared.com";
|
2022-01-20 17:00:17 +01:00
|
|
|
# use sign subkey's fingerprint: gpg2 -K --with-subkey-fingerprint
|
|
|
|
signingKey = "16F6 4623 8B1C 80C4 6267 6FF9 4D13 24C5 006E 9B2E";
|
2020-09-23 13:19:19 +02:00
|
|
|
dirs = [ "~/dev/work/" ];
|
2020-03-13 21:18:08 +01:00
|
|
|
};
|
|
|
|
};
|
2020-08-15 03:18:48 +02:00
|
|
|
|
2020-09-23 13:19:19 +02:00
|
|
|
ignores = [ ".direnv" ];
|
|
|
|
signing = { signByDefault = true; };
|
2020-08-15 03:18:48 +02:00
|
|
|
extraConfig = {
|
2020-09-23 13:19:19 +02:00
|
|
|
init = { defaultBranch = "main"; };
|
|
|
|
pull = { rebase = true; };
|
2020-08-15 03:18:48 +02:00
|
|
|
rebase = {
|
|
|
|
autoStash = true;
|
|
|
|
autoSquash = true;
|
|
|
|
abbreviateCommands = true;
|
|
|
|
missingCommitsCheck = "warn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
aliases = {
|
2023-01-06 20:05:21 +01:00
|
|
|
# usage: git mr <source> <MR number> (git mr origin 1010)
|
2020-09-23 13:19:19 +02:00
|
|
|
mr =
|
|
|
|
"!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
2023-01-06 20:05:21 +01:00
|
|
|
# usage: git pr <source> <PR number> (git pr origin 1010)
|
|
|
|
pr = "!sh -c 'git fetch $1 pull/$2/head:pr/$2 && git checkout pr/$2' -";
|
2020-08-15 03:18:48 +02:00
|
|
|
};
|
2020-03-13 21:18:08 +01:00
|
|
|
};
|
|
|
|
}
|