40 lines
917 B
Nix
40 lines
917 B
Nix
# ==========================================
|
|
# GIT CONFIGURATION
|
|
# ==========================================
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
programs.git = {
|
|
enable = true;
|
|
settings = {
|
|
user = {
|
|
name = "Matiss"; # CHANGE ME
|
|
email = "your-email@users.noreply.github.com"; # CHANGE ME
|
|
};
|
|
|
|
# SSH for GitHub by default
|
|
url."git@github.com:".insteadOf = "https://github.com/";
|
|
|
|
init.defaultBranch = "main";
|
|
diff.algorithm = "histogram";
|
|
|
|
push = {
|
|
autoSetupRemote = true;
|
|
default = "current";
|
|
};
|
|
};
|
|
};
|
|
|
|
# SSH — GitHub key
|
|
programs.ssh = {
|
|
enable = true;
|
|
matchBlocks."github.com" = {
|
|
identityFile = "/home/matiss/.ssh/id_ed25519"; # CHANGE ME to your key path
|
|
identitiesOnly = true;
|
|
};
|
|
matchBlocks."*" = {
|
|
setEnv.TERM = "xterm-256color";
|
|
};
|
|
};
|
|
}
|