From fc7c67c27be71031ad8ecce3330dec7c56f975ef Mon Sep 17 00:00:00 2001 From: Aria Nolan Date: Sun, 5 Nov 2023 00:15:51 -0400 Subject: [PATCH] added git config, gave up on formatting nix with helix --- users/tacocat/helix/languages.nix | 5 --- users/tacocat/home.nix | 5 --- users/tacocat/programs/default.nix | 32 +++-------------- users/tacocat/programs/git.nix | 58 ++++++++++++++++++++++++++++++ users/tacocat/shell/default.nix | 15 ++++++++ 5 files changed, 77 insertions(+), 38 deletions(-) create mode 100644 users/tacocat/programs/git.nix diff --git a/users/tacocat/helix/languages.nix b/users/tacocat/helix/languages.nix index 3efd00b..a6b8031 100644 --- a/users/tacocat/helix/languages.nix +++ b/users/tacocat/helix/languages.nix @@ -19,11 +19,6 @@ language-servers = ["java-language-server"]; } - { - name = "nix"; - auto-format = true; - } - { name = "latex"; indent.tab-width = 2; diff --git a/users/tacocat/home.nix b/users/tacocat/home.nix index 25d6f47..426f293 100644 --- a/users/tacocat/home.nix +++ b/users/tacocat/home.nix @@ -12,11 +12,6 @@ "$HOME/.local/bin" "$HOME/.dotnet" ]; - shellAliases = { - gaa = "git add ."; - gcm = "git commit -m"; - gpom = "git push -u origin main"; - }; packages = with pkgs; [ wineWowPackages.unstable comic-mono diff --git a/users/tacocat/programs/default.nix b/users/tacocat/programs/default.nix index 265a60e..b50513e 100644 --- a/users/tacocat/programs/default.nix +++ b/users/tacocat/programs/default.nix @@ -1,41 +1,17 @@ { imports = [ ./kitty.nix + ./git.nix ]; + programs.eza = { enable = true; enableAliases = true; git = true; }; + programs.bat = { enable = true; }; - programs.gitui = { - enable = true; - theme = '' - ( - selected_tab: Reset, - command_fg: DarkGray, - selection_bg: Green, - selection_fg: White, - cmdbar_bg: Blue, - cmdbar_extra_lines_bg: Blue, - disabled_fg: Magenta, - diff_line_add: Green, - diff_line_delete: Red, - diff_file_added: LightGreen, - diff_file_removed: LightRed, - diff_file_moved: LightMagenta, - diff_file_modified: Yellow, - commit_hash: Magenta, - commit_time: LightCyan, - commit_author: Green, - danger_fg: Red, - push_gauge_bg: Blue, - push_gauge_fg: Reset, - tag_fg: LightMagenta, - branch_fg: LightYellow, - ) - ''; - }; + } diff --git a/users/tacocat/programs/git.nix b/users/tacocat/programs/git.nix new file mode 100644 index 0000000..dadeede --- /dev/null +++ b/users/tacocat/programs/git.nix @@ -0,0 +1,58 @@ +{ + programs.git = { + enable = true; + userEmail = "tacocat@chytrid.org"; + userName = "Aria Nolan"; + extraConfig = { + init.defaultbranch = "main"; + }; + aliases = { + co = "checkout"; + aa = "add ."; + pom = "push -u origin main"; + cm = "commit -m"; + }; + delta = { + enable = true; + options = { + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-decoration-style = "none"; + file-style = "bold yellow ul"; + }; + features = "decorations"; + whitespace-error-style = "22 reverse"; + syntax-theme = "ansi"; + }; + }; + }; + + programs.gitui = { + enable = true; + theme = '' + ( + selected_tab: Reset, + command_fg: DarkGray, + selection_bg: Green, + selection_fg: White, + cmdbar_bg: Blue, + cmdbar_extra_lines_bg: Blue, + disabled_fg: Magenta, + diff_line_add: Green, + diff_line_delete: Red, + diff_file_added: LightGreen, + diff_file_removed: LightRed, + diff_file_moved: LightMagenta, + diff_file_modified: Yellow, + commit_hash: Magenta, + commit_time: LightCyan, + commit_author: Green, + danger_fg: Red, + push_gauge_bg: Blue, + push_gauge_fg: Reset, + tag_fg: LightMagenta, + branch_fg: LightYellow, + ) + ''; + }; +} diff --git a/users/tacocat/shell/default.nix b/users/tacocat/shell/default.nix index 8a07890..4ee84a8 100644 --- a/users/tacocat/shell/default.nix +++ b/users/tacocat/shell/default.nix @@ -19,10 +19,25 @@ "$git_state" "$git_status" "$package" + "$nix_shell" + "$cmd_duration" "$status" "$character" ]; scan_timeout = 10; + git_commit.tag_disabled = false; + git_status = { + ahead = ''⇡''${count}''; + behind = ''⇣''${count}''; + diverged = ''⇕⇡''${ahead_count}⇣''${behind_count}''; + staged = "+$count"; + }; + nix_shell = { + format = "via [$symbol$state]($style) "; + impure_msg = "ι"; + pure_msg = "ρ"; + symbol = "❄️"; + }; # character = { # success_symbol = "[%](bold green)"; # error_symbol = "[%](bold red)";