update git config

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-10-25 22:03:13 +02:00
parent 2ad7a99077
commit 61c56e1b1d
2 changed files with 30 additions and 30 deletions

View File

@@ -5,8 +5,6 @@
in { in {
programs.git = { programs.git = {
enable = true; enable = true;
userName = username;
userEmail = email;
ignores = [ ignores = [
".cache/" ".cache/"
".DS_Store" ".DS_Store"
@@ -19,13 +17,14 @@ in {
"result" "result"
"result-*" "result-*"
]; ];
extraConfig = { settings = {
user.name = username;
user.email = email;
init.defaultBranch = "main"; init.defaultBranch = "main";
pull.rebase = "false"; pull.rebase = "false";
push.autoSetupRemote = true; push.autoSetupRemote = true;
color.ui = "1"; color.ui = "1";
}; alias = {
aliases = {
essa = "push --force"; essa = "push --force";
co = "checkout"; co = "checkout";
fuck = "commit --amend -m"; fuck = "commit --amend -m";
@@ -52,4 +51,5 @@ in {
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`"; edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
}; };
}; };
};
} }

View File

@@ -3,7 +3,7 @@
# Obviously, change this to your own SSH key. # Obviously, change this to your own SSH key.
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL"; home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
programs.git.extraConfig = { programs.git.settings = {
commit.gpgsign = true; commit.gpgsign = true;
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
gpg.format = "ssh"; gpg.format = "ssh";