mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nd: drop
This commit is contained in:
parent
76557154c7
commit
079e7acf26
5 changed files with 0 additions and 81 deletions
|
|
@ -44,7 +44,6 @@ in {
|
|||
pkgs.nurl
|
||||
pkgs.nvd
|
||||
pkgs.niv
|
||||
# myPkgs.nd
|
||||
];
|
||||
programs = {
|
||||
neovim.enable = true;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ in {
|
|||
pkgs.nurl
|
||||
pkgs.nvd
|
||||
pkgs.niv
|
||||
myPkgs.nd
|
||||
];
|
||||
programs = {
|
||||
neovim.enable = true;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ in rec {
|
|||
typst-mutilate = pkgs.callPackage ./typst-mutilate.nix {};
|
||||
webtoon_downloader = pkgs.callPackage ./webtoon_downloader.nix {};
|
||||
|
||||
nd = pkgs.callPackage ./nd {};
|
||||
xbrightness = pkgs.callPackage ./xbrightness.nix {};
|
||||
ffgun = pkgs.callPackage ./ffgun.nix {};
|
||||
easyscan = pkgs.callPackage ./easyscan.nix {};
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
writeShellApplication,
|
||||
nix-output-monitor,
|
||||
nvd,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "nd";
|
||||
runtimeInputs = [
|
||||
nix-output-monitor
|
||||
nvd
|
||||
];
|
||||
text = builtins.readFile ./nd.sh;
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
bold=$(tput bold)
|
||||
normal=$(tput sgr0)
|
||||
|
||||
this_hash="latest"
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--clean*)
|
||||
shopt -s nullglob
|
||||
for link in nix-diff*; do
|
||||
set -x
|
||||
unlink "$link"
|
||||
set +x
|
||||
done
|
||||
exit
|
||||
;;
|
||||
--last*)
|
||||
if [[ "$1" != *=* ]]; then shift; fi
|
||||
last_hash=$(git rev-parse "${1#*=}")
|
||||
;;
|
||||
--this*)
|
||||
if [[ "$1" != *=* ]]; then shift; fi
|
||||
this_hash=$(git rev-parse "${1#*=}")
|
||||
;;
|
||||
--hostname* | --host*)
|
||||
if [[ "$1" != *=* ]]; then shift; fi
|
||||
hostname="${1#*=}"
|
||||
;;
|
||||
*)
|
||||
echo "Error: unknown argument $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
build_config() {
|
||||
hash="$1"
|
||||
link="nix-diff-${hostname}-${hash:0:7}"
|
||||
|
||||
if [ "$hash" = latest ]; then
|
||||
# build the dirty worktree configuration
|
||||
ref=".#nixosConfigurations.${hostname}.config.system.build.toplevel"
|
||||
else
|
||||
ref=".?ref=${hash}#nixosConfigurations.${hostname}.config.system.build.toplevel"
|
||||
fi
|
||||
|
||||
if [ -L "$link" ]; then
|
||||
echo "Found link ${bold}$link${normal}"
|
||||
else
|
||||
echo "Starting configuration build at ${bold}$hash${normal}"
|
||||
nix build "$ref" --out-link "$link" --log-format internal-json --verbose |& nom --json
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Comparing ${bold}$hostname${normal}'s configuration of ${bold}${last_hash:0:7}${normal} and ${bold}${this_hash:0:7}${normal}"
|
||||
build_config "$last_hash"
|
||||
build_config "$this_hash"
|
||||
|
||||
echo "Diffing..."
|
||||
nvd diff "nix-diff-${hostname}-${last_hash:0:7}" "nix-diff-${hostname}-${this_hash:0:7}"
|
||||
|
||||
# Always unlink if diffing with current dirty ref
|
||||
if [ "$this_hash" = latest ]; then
|
||||
unlink "nix-diff-${hostname}-${this_hash:0:7}"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue