nixos-config/home/git.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2020-08-15 03:06:37 +02:00
{ config, pkgs, ... }:
2020-03-13 21:18:08 +01:00
{
2020-08-15 03:06:37 +02:00
imports = [
./modules/git.nix
];
2020-03-13 21:18:08 +01:00
programs.git = {
enable = true;
2020-08-15 03:06:37 +02:00
profiles = {
private = {
name = "Felix Tenley";
email = "dev@felschr.com";
signingKey = "6AB3 7A28 5420 9A41 82D9 0068 910A CB9F 6BD2 6F58";
2020-08-25 21:53:05 +02:00
dirs = [ "~/dev/private/" "/etc/nixos" ];
2020-08-15 00:10:53 +02:00
};
2020-08-15 03:06:37 +02:00
work = {
name = "Felix Schröter";
email = "fs@upsquared.com";
signingKey = "F28B FB74 4421 7580 5A49 2930 BE85 F0D9 987F A014";
2020-08-25 21:53:05 +02:00
dirs = [ "~/dev/work/" ];
2020-03-13 21:18:08 +01:00
};
};
ignores = [".direnv"];
signing = {
signByDefault = true;
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
rebase = {
autoStash = true;
autoSquash = true;
abbreviateCommands = true;
missingCommitsCheck = "warn";
};
};
aliases = {
mr = "!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
pr = "!sh -c 'git fetch $1 refs/pull/$2/head:pr/$1 && git checkout pr/$2'";
};
2020-03-13 21:18:08 +01:00
};
}