{ pkgs, lib, user, rice, ... }: lib.mkIf (user != "tv") { home.packages = with pkgs; [ git delta (pkgs.writeShellScriptBin "git_monitor" '' #!/bin/bash # List of directories to check directories=( "$HOME/nix-dots" "$HOME/shared/nx-obsidian-vault" "$HOME/shared/HSMW/Praxis/BCAM/bolt-llmserver" "$HOME/shared/HSMW/Praxis/BCAM/bcam-tools" "$HOME/Pictures/wallpapers" ) echo "" for dir in "''${directories[@]}"; do if [ -d "$dir" ]; then cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; } echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):" if [[ $* == *--fetch* ]]; then git fetch fi gst echo "" cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; } else echo "Directory $dir does not exist." fi done '') (writeShellScriptBin "gst" "awk -vOFS='' 'NR==FNR {all[i++] = $0; difffiles[$1] = $0; next;} ! ($2 in difffiles) {print; next;} {gsub($2, difffiles[$2]); print;} END {if (NR != FNR) {exit;} for (i in all) {print all[i];}}' <(git diff --color --stat=$(($(tput cols) - 3)) HEAD | sed '$d; s/^ //') <(git -c color.status=always status -sb)") ]; programs.git = { enable = true; userName = ''Lennart J. Kurzweg (Nx2)''; userEmail = "git@nx2.site"; delta = { enable = true; options = { line-numbers = true; side-by-side = false; features = "unobtrusive-line-numbers decorations"; whitespace-error-style = "22 reverse"; }; }; }; programs.lazygit = { enable = true; settings = { windowSize = "normal"; gui.theme = with rice.color; { lightTheme = false; activeBorderColor = [ foreground "bold" ]; inactiveBorderColor = [ border ]; optionsTextColor = [ tertiary.base ]; selectedLineBgColor = [ secondary.base ]; selectedRangeByColor = [ weird.bright ]; showRandomTip = true; animateExplosion = true; cherryPickedCommitFgColor = [ accent.base ]; # Foreground color of copied commit cherryPickedCommitBgColor = [ secondary.dark ]; # Background color of copied commit markedBaseCommitFgColor = [ accent.base ]; # Foreground color of marked base commit (for rebase) markedBaseCommitBgColor = [ secondary.dark ]; # Background color of marked base commit (for rebase) unstagedChangesColor = [ negative.base ]; # Color for file with unstaged changes defaultFgColor = [ "default" ]; # Default text color }; }; }; }