Compare commits
3 Commits
68cb4377b7
...
88e73a3ea8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88e73a3ea8 | ||
|
|
8be84ff0a9 | ||
|
|
9d3418bec2 |
@@ -1,40 +1,13 @@
|
|||||||
{ pkgs, hyper, rice, ... }:
|
{ pkgs, hyper, rice, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
git
|
|
||||||
delta
|
delta
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "git_monitor" ''
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# List of directories to check
|
|
||||||
directories=(
|
|
||||||
"$HOME/nix-dots"
|
|
||||||
"$HOME/obsidian-vault"
|
|
||||||
"$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)")
|
(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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.gitFull;
|
||||||
userName = ''Lennart J. Kurzweg (Nx2)'';
|
userName = ''Lennart J. Kurzweg (Nx2)'';
|
||||||
userEmail = "git@${hyper.domain}";
|
userEmail = "git@${hyper.domain}";
|
||||||
delta = {
|
delta = {
|
||||||
@@ -46,6 +19,14 @@
|
|||||||
whitespace-error-style = "22 reverse";
|
whitespace-error-style = "22 reverse";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
extraConfig = {
|
||||||
|
credential = {
|
||||||
|
"https://git.da.dicos.de".username = pkgs.lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
|
||||||
|
"https://git.da.dicos.de".password = pkgs.lib.mkIf (hyper.host =="NxWSL") "Test";
|
||||||
|
};
|
||||||
|
url."ssh://git@git.da.dicos.de/".insteadOf = pkgs.lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
|
||||||
|
pull.rebase = false; # true
|
||||||
|
};
|
||||||
};
|
};
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
preview-completion-insert = true;
|
preview-completion-insert = true;
|
||||||
completion-trigger-len = 1;
|
completion-trigger-len = 1;
|
||||||
auto-info = true;
|
auto-info = true;
|
||||||
true-color = false; # is detected automatically if set to false
|
true-color = true; # is detected automatically if set to false
|
||||||
undercurl = false; # is detected automatically if set to false
|
undercurl = false; # is detected automatically if set to false
|
||||||
rulers = [];
|
rulers = [];
|
||||||
bufferline = "always";
|
bufferline = "always";
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
glib
|
glib
|
||||||
glow
|
glow
|
||||||
gnumake
|
gnumake
|
||||||
|
htop
|
||||||
imagemagick
|
imagemagick
|
||||||
jq
|
jq
|
||||||
lolcat
|
lolcat
|
||||||
|
|||||||
Reference in New Issue
Block a user