move git to graphical

This commit is contained in:
Henry Hiles 2026-06-06 21:46:03 -04:00
commit 798255048d
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
3 changed files with 19 additions and 20 deletions

36
modules/graphical/git.nix Normal file
View 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";
};
}