Compare commits
4 Commits
5d827cd2d1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| fb454dd231 | |||
| adb08fb062 | |||
| c7802877e3 | |||
| 3abd53069b |
@@ -126,6 +126,7 @@ in {
|
|||||||
texpresso
|
texpresso
|
||||||
python313Packages.pygments
|
python313Packages.pygments
|
||||||
android-tools
|
android-tools
|
||||||
|
pstree
|
||||||
# texlive.combined.scheme-full
|
# texlive.combined.scheme-full
|
||||||
|
|
||||||
# security
|
# security
|
||||||
|
|||||||
@@ -14,5 +14,11 @@
|
|||||||
NNN_TERMINAL = "alacritty";
|
NNN_TERMINAL = "alacritty";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nnn.plugins.src = ./preview-tui;
|
home.activation.nnnPlugins = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
mkdir -p $HOME/.config/nnn/plugins
|
||||||
|
cp --no-preserve=mode ${./preview-tui} $HOME/.config/nnn/plugins/preview-tui
|
||||||
|
chmod +x $HOME/.config/nnn/plugins/preview-tui
|
||||||
|
'';
|
||||||
|
|
||||||
|
# programs.nnn.plugins.src = ./nnn-plugins;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,3 +498,5 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
26
home/scripts/nix-diff.sh
Normal file
26
home/scripts/nix-diff.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# shows what changed between the current and previous NixOS generation
|
||||||
|
|
||||||
|
PROFILE="/nix/var/nix/profiles/system"
|
||||||
|
|
||||||
|
# current generation number from the profile symlink (e.g. system-185-link)
|
||||||
|
current_gen=$(readlink "$PROFILE" | grep -oP '\d+')
|
||||||
|
prev_gen=$((current_gen - 1))
|
||||||
|
|
||||||
|
current=$(readlink -f "${PROFILE}-${current_gen}-link")
|
||||||
|
previous=$(readlink -f "${PROFILE}-${prev_gen}-link")
|
||||||
|
|
||||||
|
if [ ! -e "${PROFILE}-${prev_gen}-link" ]; then
|
||||||
|
echo "Previous generation ($prev_gen) not found (garbage collected?)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\033[1mGen $prev_gen:\033[0m $previous"
|
||||||
|
echo -e "\033[1mGen $current_gen:\033[0m $current"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if command -v nvd &>/dev/null; then
|
||||||
|
nvd diff "$previous" "$current"
|
||||||
|
else
|
||||||
|
nix store diff-closures "$previous" "$current"
|
||||||
|
fi
|
||||||
1
home/scripts/ptop.sh
Normal file
1
home/scripts/ptop.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ps -eo pid=,%cpu=,comm= --sort=-%cpu | awk '$3 != "ps"' | head -n 5 | while read p c n; do printf "\n\033[1;31m[ %s%% CPU ]\033[0m \033[1m%s\033[0m (PID: %s)\n" "$c" "$n" "$p"; pstree -g 3 -w -p "$p" | sed -E 's#/nix/store/[a-z0-9]{32}-##g; s#/etc/profiles/per-user/synchronous/bin/##g; s#/run/current-system/systemd/lib/##g' | cut -c 1-$COLUMNS; done
|
||||||
Reference in New Issue
Block a user