added gitconfig

This commit is contained in:
Ariel Sosnovsky committed 2024-04-25 15:58:56 -04:00
1 parent 74e0af7dc6
commit d026be1709
4 files changed
+56 -10

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# http://editorconfig.org
root = true
[*]
indent_style = tab
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
BIN
View File
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
[alias]
pp = "!f() { \
echo 'git pull --ff';\
git pull --ff; \
echo 'git push';\
git push; \
}; f";
up = "pull --rebase --autostash";
ca = "commit -a";
ls = "log --oneline";
cap = "!f() { \
echo 'commiting code'; \
git ca ${@}; \
echo 'pushing...'; \
git push ; \
}; f";
undo-commit = "!f() { \
lastcommit=$(git log --oneline -n 1); \
echo '[[switching]] from' $lastcommit; \
git reset --soft HEAD~${1:-1}; \
lastcommit=$(git log --oneline -n 1); \
echo '[[switching]] to' $lastcommit; \
git status; \
}; f";
sync = "!f() { \
target_branch=${1:-main}; \
remote=${2:-origin}; \
git fetch $remote $target_branch:$target_branch; \
}; f";
+17 -10
View File
@@ -1,6 +1,10 @@
{ hostName, homeMangerVersion, user }:
{ pkgs, ... }:
{
let
gitconfigs =
(builtins.filterSource (path: type: type != "directory") ../../gitconfigs);
gitconfigFiles = builtins.attrNames (builtins.readDir gitconfigs);
in {
home-manager.users.root = {
home.stateVersion = homeMangerVersion;
programs.git = {
@@ -17,9 +21,7 @@
home-manager.users.${user.name} = {
home = {
stateVersion = homeMangerVersion;
shellAliases = {
cat = "bat";
};
shellAliases = { cat = "bat"; };
packages = [
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
pkgs.kubectl
@@ -41,9 +43,17 @@
enable = true;
userName = user.fullName;
userEmail = user.email;
delta = {
enable = true;
delta = { enable = true; };
extraConfig = {
color = { ui = "auto"; };
push = {
default = "upstream";
autoSetupRemote = true;
};
init = { defaultBranch = "main"; };
};
includes =
(builtins.map (f: { path = gitconfigs + "/" + f; }) gitconfigFiles);
};
zsh = {
enable = true;
@@ -54,10 +64,7 @@
};
zsh.oh-my-zsh = {
enable = true;
plugins = [
"git"
"sudo"
];
plugins = [ "git" "sudo" ];
theme = "robbyrussell";
};
};