initial config
This commit is contained in:
39
modules/user/git.nix
Normal file
39
modules/user/git.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# ==========================================
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user