diff options
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/users/fcuny/git.nix | 29 | ||||
| -rw-r--r-- | nix/users/fcuny/shell.nix | 37 |
2 files changed, 59 insertions, 7 deletions
diff --git a/nix/users/fcuny/git.nix b/nix/users/fcuny/git.nix index 81a9355..92f4f52 100644 --- a/nix/users/fcuny/git.nix +++ b/nix/users/fcuny/git.nix @@ -74,18 +74,35 @@ extraConfig = { core.whitespace = "trailing-space,space-before-tab"; - color.ui = "true"; + color.ui = true; - # abort if the remote branch does not match the local one - push.default = "simple"; + # nicer output + column.ui = "auto"; # https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/ diff.algorithm = "histogram"; init.defaultBranch = "main"; + # https://blog.gitbutler.com/how-git-core-devs-configure-git/ + push = { + # abort if the remote branch does not match the local one + default = "simple"; + autoSetupRemote = true; + followTags = true; + }; + + fetch = { + prune = true; + pruneTags = true; + all = true; + }; + pull.rebase = true; + rebase = { + autosquash = true; + updateRefs = true; # Automatically create a temporary stash entry before the # operation begins, and apply it after the operation ends. autoStash = true; @@ -93,8 +110,10 @@ missingCommitsCheck = "warn"; }; - branch.autosetuprebase = "remote"; - branch.sort = "authordate"; + branch = { + autosetuprebase = "remote"; + sort = "authordate"; + }; url = { "ssh://git@github.rbx.com/" = { diff --git a/nix/users/fcuny/shell.nix b/nix/users/fcuny/shell.nix index b7d0a45..f5d83e5 100644 --- a/nix/users/fcuny/shell.nix +++ b/nix/users/fcuny/shell.nix @@ -94,8 +94,41 @@ in programs.starship = { enable = true; settings = { - kubernetes.disabled = false; - kubernetes.style = "bold blue"; + add_newline = false; + git_branch = { + symbol = "🌱 "; + }; + git_commit = { + commit_hash_length = 4; + tag_symbol = "🔖 "; + }; + git_state = { + format = "[($state($progress_current of $progress_total))]($style) "; + cherry_pick = "[🍒 PICKING](bold red)"; + }; + git_status = { + conflicted = "💢"; + ahead = "💨"; + behind = "😰"; + diverged = "😵"; + untracked = "🤷"; + stashed = "📦"; + modified = "📝"; + staged = "[++($count)](green)"; + renamed = "👅"; + deleted = "🗑️"; + }; + "$schema" = "https://starship.rs/config-schema.json"; + hostname = { + disabled = true; + }; + username = { + disabled = true; + }; + kubernetes = { + disabled = false; + style = "bold blue"; + }; nix_shell.disabled = false; }; }; |
