move git to graphical
This commit is contained in:
parent
0c3d4436a4
commit
798255048d
3 changed files with 19 additions and 20 deletions
36
modules/graphical/git.nix
Normal file
36
modules/graphical/git.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "Henry-Hiles";
|
||||
email = "henry@henryhiles.com";
|
||||
signingKey = builtins.elemAt (import ../../secrets/keys.nix) 0;
|
||||
};
|
||||
url = {
|
||||
"git@github.com:".insteadOf = [ "https://github.com" ];
|
||||
"git@codeberg.org:".insteadOf = [ "https://codeberg.org" ];
|
||||
"git@git.federated.nexus:".insteadOf = [ "https://git.federated.nexus" ];
|
||||
"git@forgejo.ellis.link:".insteadOf = [ "https://forgejo.ellis.link" ];
|
||||
};
|
||||
init.defaultBranch = "main";
|
||||
commit.gpgsign = true;
|
||||
pull.rebase = true;
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
};
|
||||
environment.shellAliases =
|
||||
let
|
||||
gitExe = lib.meta.getExe pkgs.git;
|
||||
in
|
||||
{
|
||||
|
||||
push = "${gitExe} push";
|
||||
commit = "${gitExe} commit -am";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue